@import url("https://fonts.googleapis.com/css2?family=Geologica:wght,CRSV@100..900,0&display=swap");

* {
    box-sizing: border-box;
    font-family: "Geologica", "Arial", sans-serif;
}

.text-red {
    color: #e60023;
}

.text-grey {
    color: #5c5c5c;
}

body {
    background: #f6f6f6;
    margin: 0;
    padding: 0;
}

main {
    width: 100vw;
    height: 100dvh;
    display: flex;
    flex-direction: column;
}

.container {
    margin: auto;
    padding: 10px;
    display: flex;
    width: 100%;
}

.card {
    width: 560px;
    max-width: 100%;
    background: #fff;
    padding: 15px;
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
    display: none;
    animation: fade 0.35s ease;
    text-align: center;
    margin: auto;
}

.card h2 {
    font-size: 18px;
}

@media (min-width: 340px) {
    .card {
        padding: 30px;
    }
}
@media (min-width: 768px) {
    .card h2 {
        font-size: 24px;
    }
}

.card.active {
    display: block;
}

@keyframes fade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.code-inputs {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 15px;
}

.code-inputs input {
    width: 36px;
    height: 44px;
    font-size: 20px;
    text-align: center;
    border-radius: 8px;
    border: 1px solid #ddd;
    transition: all 300ms ease;
    font-weight: bold;
}

.code-inputs input:focus {
    border-color: #e60023;
    outline: green;
}

@media (min-width: 340px) {
    .code-inputs input {
        width: 42px;
        height: 50px;
        font-size: 20px;
    }
}
@media (min-width: 600px) {
    .code-inputs input {
        width: 77px;
        height: 80px;
        font-size: 32px;
    }
}

.code-inputs.error input {
    border-color: #e60023;
}

.error-text {
    color: #e60023;
    font-size: 13px;
}

.upload-area {
    border: 2px solid #ececec;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
}

.upload-icon {
    display: inline-block;
    width: 80px;
}

.crop-container {
    margin-top: 20px;
    text-align: center;
}

.insta-ring {
    width: 180px;
    height: 180px;
    margin: auto;
    padding: 6px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    /* background: linear-gradient(
        45deg,
        #feda75,
        #fa7e1e,
        #d62976,
        #962fbf,
        #4f5bd5
    ); */
}

.instaring {
    position: relative;
}

.instaring:after {
    display: block;
    content: "";
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: url("../img/circle.png") no-repeat center center;
    background-size: 101% 101%;
    pointer-events: none;
}

.preview {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #ffffff;
    overflow: hidden;
    position: relative;
}

.preview canvas {
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
}

.actions {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #ececec;
}

.card .submit {
    margin-top: 20px;
}

@media (min-width: 600px) {
    .card .submit {
        text-align: right;
    }
}

.btn {
    padding: 10px 10px;
    font-size: 16px;
    border-radius: 8px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 600px) {
    .btn {
        padding: 10px 16px;
        font-size: 18px;
    }
}

.btn.primary {
    background: #e60023;
    color: #fff;
    border-color: #e60023;
}

.media-box {
    border: 2px dashed #ddd;
    border-radius: 14px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    position: relative;
}

.media-box.dragover {
    border-color: #e60023;
}

.upload-state {
    pointer-events: none;
}

.crop-circle {
    width: 220px;
    height: 220px;
    margin: auto;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    background: #000;
}

.crop-circle img {
    position: absolute;
    top: 50%;
    left: 50%;
    height: 102%;
    width: 102%;
    object-fit: contain;
    transform-origin: center;
    touch-action: none; /* 🔥 REQUIRED FOR MOBILE DRAG */
    user-select: none;
    cursor: grab;
}

.crop-state {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.range-container {
    margin: 20px;
}

.range-container input {
    display: block;
    width: 100%;
    accent-color: #e60023;
}

input[type="range"] {
    -webkit-appearance: none;
    margin: 18px 0;
    width: 100%;
}
input[type="range"]:focus {
    outline: none;
}
input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 8.4px;
    cursor: pointer;

    background: #e60023;
    border-radius: 1.3px;
    border: 0.2px solid #010101;
}
input[type="range"]::-webkit-slider-thumb {
    height: 36px;
    width: 16px;
    border-radius: 3px;
    background: #fe5000;
    cursor: pointer;
    -webkit-appearance: none;
    margin-top: -14px;
    border: 1px solid #fe5000 !important;
}
input[type="range"]:focus::-webkit-slider-runnable-track {
    background: #e60023;
}
input[type="range"]::-moz-range-track {
    width: 100%;
    height: 8.4px;
    cursor: pointer;

    background: #e60023;
    border-radius: 1.3px;
}
input[type="range"]::-moz-range-thumb {
    height: 36px;
    width: 16px;
    border-radius: 3px;
    background: #fe5000;
    cursor: pointer;
    border: 1px solid #fe5000 !important;
}
input[type="range"]::-ms-track {
    width: 100%;
    height: 8.4px;
    cursor: pointer;
    background: transparent;
    border-color: transparent;
    border-width: 16px 0;
    color: transparent;
}
input[type="range"]::-ms-fill-lower {
    background: #e60023;
    border: 0.2px solid #010101;
    border-radius: 2.6px;
}
input[type="range"]::-ms-fill-upper {
    background: #e60023;
    border: 0.2px solid #010101;
    border-radius: 2.6px;
}
input[type="range"]::-ms-thumb {
    height: 36px;
    width: 16px;
    border-radius: 3px;
    background: #ffffff;
    cursor: pointer;
}
input[type="range"]:focus::-ms-fill-lower {
    background: #e60023;
}
input[type="range"]:focus::-ms-fill-upper {
    background: #e60023;
}
