@import url('https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300..900;1,300..900');

#modal {
    position: fixed; /* fixo na tela */
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(60, 60, 60, 0.2);
    z-index: 1000;
  
    display: flex; /* usa flexbox pra centralizar */
    justify-content: center; /* horizontal */
    align-items: center;    /* vertical */
}
  
.modal-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    width: 300px;   /* largura fixa ou responsiva */
    max-width: 90%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
}

.modal-title {}

.modal-body {}

.modal-input-code{
    display: flex;
    flex-direction: column;
    align-items: center;
}

.style-code-input {
    max-width: 70px;
    padding: 4px 6px 4px 6px;
    font-size: 1.2rem;
    border-radius: 4px;
    border: 1.5px solid #938d8d;
    margin-top: 10px;
    background-color: rgba(192, 185, 185, 0.1);
}

#json-modal {
    position: fixed; /* fixo na tela */
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(60, 60, 60, 0.2);
    z-index: 4000;
  
    display: none; /* usa flexbox pra centralizar */
    justify-content: center; /* horizontal */
    align-items: center;    /* vertical */
}
  
.json-modal-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    width: 450px;   /* largura fixa ou responsiva */
    max-width: 90%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
}

.json-modal-input {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.style-json-input {
    width: 90%;
    height: 100px;
    padding: 10px;
    font-size: 1rem;
    border-radius: 4px;
    border: 1.5px solid #938d8d;
    margin-top: 10px;
    background-color: rgba(192, 185, 185, 0.1);
    resize: vertical; /* ou 'none' se quiser travar o tamanho */
    box-sizing: border-box;
}


#form-modal {
    position: fixed; /* fixo na tela */
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(60, 60, 60, 0.2);
    z-index: 5000;
  
    display: none; /* usa flexbox pra centralizar */
    justify-content: center; /* horizontal */
    align-items: center;    /* vertical */
}
  
.form-modal-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    width: 600px;   /* largura fixa ou responsiva */
    max-width: 90%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
}

.form-model-title {}

.form-modal-body {}

.form-modal-form {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.json-modal-content,
.form-modal-content {
    position: relative; /* necessário para o botão "absolute" funcionar dentro */
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 14px;
    font-size: 24px;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    z-index: 9999;
    transition: color 0.2s ease;
}

.close-modal:hover {
    color: #000;
}


/* PLACES TO CHANGE COLOURS */
#console {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: white; /* Change the colour of the whole machine */
    width: 350px;
    height: 500px;
    padding: 30px;
}

.boxed {
    border: 2px #f06523 solid;
    padding: 15x 20px 15px 20px;
    background-color: white; /* Change the default colour of the buttons*/
    border-radius: 10px;
    box-shadow: 5px 5px 0px #f06523; /* Change the drop shadow on all the elements */
    margin: 10px;
}

#banner {
    width: 100%;
    text-align: center;
    font-weight: 900;
    border-radius: 10px;
    padding: 0;
    -webkit-text-stroke: 4px #f06523; /* Change the outline colour of the machine title text*/
    paint-order: stroke fill;
    font-size: 3rem;
    color: #fff;
    text-shadow: 5px 5px 0px #f06523; /* Change the drop shadow colour of the machine title text - should probably be the same as the stroke*/
}

#window {
    position: relative;
    background-color: white; /* Change the background colour of the claw machine game window */
    width: 100%;
    height: 350px;
    border: 2px #f06523 solid; /* Change the outline colour of the claw machine game window*/
    padding: 15x 20px 15px 20px;
    border-radius: 10px;
    margin-top: 10px;
    margin-bottom: 10px;
    transition: 1s;
}

#claw-block {
    height: 35px;
    width: 80px;
    margin-bottom: 0;
    margin-top: -25px;
    z-index: 2;
    position: relative;
    background-color: white; /* Change the colour of the block that is on the rope carrying the claw*/
}

#drop {
    border-radius: 50px;
    color: #f06523;
    font-weight: 700;
    font-size: 1.2rem;
    background-color: white; /* If you want to make the drop button a different colour*/
}

.btn {
    color: #f06523;
    padding: 10px 30px 10px 30px;
    width:fit-content;  
    margin-left: auto;
    margin-right: auto;
    background-color:  white; /* If you want to make the arrow buttons a different colour*/
}

#play-again {
    opacity: 0;
    transition: opacity 1s;
    background-color: white; /* If you want to make the play again button a different colour*/
}

#download {
    opacity: 0;
    transition: opacity 1s;
    background-color: white; /* If you want to make the download button a different colour*/
}

/* EVERYTHING ELSE */

body {
    font-family: 'Rubik', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

#claw {
    transition: transform 0.5s;
}

#claw-rail {
    z-index: 0;
    padding: 0;
    margin: 25px 0 0 -1px;
    width: 101%;
    height: 102%;
    transform-origin: center center;
}

#claw-hands {
    width: 90px;
    margin-left: -245px;
    margin-top: -10px;
    transition: transform .7s;
    position: relative;
    transform-origin: top center;
}

#claw-rope {
    width: 90px;
    margin-left: -245px;
    margin-top: 0;
    transition: transform .7s;
    transform-origin: top center;
}

/* claw machine window content */
.content {
    position: absolute;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    text-align: center;
}

#ball-front {
    width: 96%;
    margin-bottom: -175px;
    z-index: 10;
    position: relative;
}

/* control panel specific styles */
#controls {
    display: flex;
    flex-direction: row;
    font-size: 18pt;
    width: 100%;
    column-gap: 20px;
    justify-content: space-evenly;
    transition: 1s;
}

/* button hover effect */
@media (hover: hover) {
    .btn.boxed:hover {
        transform: translate(5px, 5px);
        box-shadow: 0px 0px 0px black;
        transition: transform .1s;
    }
}

/* results page */

#result-window {
    position: relative;
    width: 100%;
    height: 350px;
    padding: 15x 20px 15px 20px;
    border-radius: 10px;
    opacity: 0;
    transition: 1s;
    transform: translateY(10px);
    text-align: center;
}

#result-image {
    width: 90%;
    padding-top: 8px;
}

#my-form {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    margin-top: 6px;
}
  
.group-field {
    display: flex;
    flex-direction: column;
    margin-bottom: 8px;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 6px;
    width: 100%;
    box-sizing: border-box;
}
  
.group-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
  }
  
  .field-label {
    font-weight: bold;
  }
  
.group-inputs {
    display: flex;
    gap: 6px;
    margin-bottom: 6px;
    width: 100%;
    box-sizing: border-box;
}
  
.field-name {
    flex-basis: 75%;
    padding: 6px;
    font-size: 14px;
    box-sizing: border-box;
}
  
.field-amount {
    flex-basis: 25%;
    padding: 4px;
    font-size: 14px;
    box-sizing: border-box;
}
  
.button-remove {
    align-self: flex-start;
    padding: 6px 12px;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.item-rare {
    border: 2px solid gold;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}

#form-fields button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    margin: 6px 4px;
    transition: background-color 0.3s;
}
  
#buttonSave {
    background-color: #3498db;
    color: white;
}
  
#buttonSave:hover {
    background-color: #2980b9;
}

#buttonAdd {
    background-color: #2ecc71;
    color: white;
}
  
#buttonAdd:hover {
    background-color: #27ae60;
}

.badge-qty {
    background-color: #007bff;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    margin-left: 5px;
}

.json-div-button-save {
    display: flex;
    justify-content: end;
    width: 90%;
    margin-top: 6px;
}

.json-div-button-save button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    margin: 6px 4px;
    transition: background-color 0.3s;
    background-color: #2ecc71;
    color: white;
}

.label-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
  
.rare-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
}
  
.label-rare {
    font-size: 0.85em;
    color: #833;
}

button.danger {
    background-color: #c0392b;
    color: white;
    margin-left: 8px;
}

.corner-button {
    position: fixed;
    padding: 10px;
    z-index: 999;
    opacity: 0;
    background-color: transparent;
    transition: opacity 0.2s;
    cursor: pointer;
}

#open-form {
    bottom: 0;
    left: 0;
    background: blue;
    color: white;
}
#open-json {
    bottom: 0;
    right: 0;
    background: orange;
    color: white;
}

.corner-button:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.1);
}

.fail-message {
    font-size: 1.5rem;
    color: #cc0000;
    margin-top: 20px;
    text-align: center;
}

.corner-button-export {
    position: fixed;
    padding: 10px;
    z-index: 1001;
    opacity: 0;
    background-color: transparent;
    transition: opacity 0.2s;
    cursor: pointer;
}

#export-json {
    top: 0;
    right: 0;
    background: rgb(62, 123, 19);
    color: white;
}

.corner-button-export:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.1);
}
