:root {
    --bg1: #07111f;
    --bg2: #0c1830;
    --bg3: #101b3b;
    --card: rgba(10, 20, 39, 0.6);
    --card-border: rgba(255, 255, 255, 0.1);
    --shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    --text: #f4f7ff;
    --muted: #b8c2d9;
    --accent: #7c5cff;
    --accent-2: #17c5ff;
}

@font-face {
    font-family: "Vazirmatn";
    src: url("assets/fonts/vazirmatn/Vazirmatn-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: "Vazirmatn";
    src: url("assets/fonts/vazirmatn/Vazirmatn-Medium.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: "Vazirmatn";
    src: url("assets/fonts/vazirmatn/Vazirmatn-Bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
}

body {
    font-family: "Vazirmatn", sans-serif;
}


.status-value .icon {
    margin-left: 6px;
    font-size: 0.9rem;
}

.status-item {
    padding: 10px 12px;
}

.final-glow {
    font-size: 3rem;
    background: none;
    box-shadow: none;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: "Vazirmatn", sans-serif;
    background:
        radial-gradient(circle at top right, rgba(124, 92, 255, 0.16), transparent 30%),
        radial-gradient(circle at bottom left, rgba(23, 197, 255, 0.12), transparent 30%),
        linear-gradient(145deg, var(--bg1), var(--bg2) 40%, var(--bg3));
    color: var(--text);
    min-height: 100%;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='1'/%3E%3C/svg%3E");
    opacity: 0.045;
    pointer-events: none;
    z-index: 1;
}

.bg-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.25;
    z-index: 0;
    pointer-events: none;
}

.orb-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    right: 8%;
    background: #7c5cff;
}

.orb-2 {
    width: 260px;
    height: 260px;
    bottom: 10%;
    left: 7%;
    background: #17c5ff;
}

.orb-3 {
    width: 180px;
    height: 180px;
    top: 50%;
    left: 45%;
    background: #2de39a;
    opacity: 0.12;
}

.game-shell {
    max-width: 980px;
    position: relative;
    z-index: 2;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.brand-box {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.brand-kicker {
    color: var(--muted);
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.brand-title {
    font-size: 1.6rem;
    font-weight: 900;
}

.gear-btn {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    border: 1px solid var(--card-border);
    background: rgba(255, 255, 255, 0.06);
    color: white;
    font-size: 1.25rem;
    backdrop-filter: blur(16px);
    cursor: pointer;
    transition: 0.25s ease;
}

.gear-btn:hover {
    transform: translateY(-2px) rotate(12deg);
    background: rgba(255, 255, 255, 0.12);
}

.main-card {
    background: var(--card);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-radius: 30px;
    box-shadow: var(--shadow);
    padding: 24px;
    overflow: hidden;
}

.status-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}

.status-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 12px 14px;
    text-align: center;
}

.status-label {
    display: block;
    color: var(--muted);
    font-size: 0.85rem;
}

.status-value {
    display: block;
    margin-top: 4px;
    font-size: 1.1rem;
    font-weight: 800;
}

.progress-wrap {
    width: 100%;
    height: 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
    margin-bottom: 24px;
}

.progress-bar-custom {
    width: 10%;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    box-shadow: 0 0 18px rgba(124, 92, 255, 0.55);
    transition: width 0.5s ease;
}

.game-header {
    margin-bottom: 24px;
}

.game-badge {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #d7deef;
    font-size: 0.9rem;
    margin-bottom: 14px;
}

.game-title {
    font-size: clamp(1.9rem, 4vw, 3rem);
    font-weight: 900;
    margin-bottom: 10px;
}

.typing-text {
    color: var(--muted);
    max-width: 720px;
    margin: 0 auto;
    min-height: 60px;
    line-height: 2;
}

.screen {
    animation: fadeIn 0.45s ease;
}

.screen-inner {
    padding: 12px 4px 8px;
}

.mystery-box,
.stage-card,
.offer-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 22px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.mystery-box p,
.stage-desc,
.offer-card p {
    color: var(--muted);
    line-height: 2;
}

.text-highlight {
    color: white;
    font-weight: 700;
}

.btn-main,
.btn-ghost,
.btn-danger-soft,
.option-btn {
    border: none;
    border-radius: 18px;
    padding: 14px 20px;
    font-weight: 800;
    transition: 0.25s ease;
    cursor: pointer;
    text-decoration: none;
}

.btn-main {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: white;
    box-shadow: 0 10px 30px rgba(124, 92, 255, 0.35);
}

.btn-main:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 35px rgba(124, 92, 255, 0.45);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.07);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.13);
    transform: translateY(-2px);
}

.btn-danger-soft {
    background: rgba(255, 93, 115, 0.14);
    color: #ffdbe1;
    border: 1px solid rgba(255, 93, 115, 0.2);
}

.btn-danger-soft:hover {
    background: rgba(255, 93, 115, 0.2);
}

.alert-box {
    margin-bottom: 18px;
    border-radius: 18px;
    padding: 14px 16px;
    font-weight: 700;
    animation: fadeIn 0.25s ease;
}

.alert-danger-box {
    background: rgba(255, 93, 115, 0.12);
    color: #ffd5db;
    border: 1px solid rgba(255, 93, 115, 0.25);
}

.alert-success-box {
    background: rgba(45, 227, 154, 0.12);
    color: #d8ffef;
    border: 1px solid rgba(45, 227, 154, 0.25);
}

.stage-card {
    max-width: 760px;
    margin: 0 auto;
}

.stage-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.stage-title {
    font-size: 1.45rem;
    font-weight: 900;
    margin: 0;
}

.stage-tag {
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(124, 92, 255, 0.14);
    color: #ddd6ff;
    font-size: 0.9rem;
    border: 1px solid rgba(124, 92, 255, 0.22);
}

.stage-desc {
    margin-bottom: 20px;
}

.form-label {
    font-weight: 700;
    margin-bottom: 8px;
}

.custom-input,
.custom-select,
textarea.custom-input {
    width: 100%;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: white;
    padding: 14px 16px;
    outline: none;
    transition: 0.25s ease;
}

.custom-input::placeholder,
textarea.custom-input::placeholder {
    color: #aeb8cf;
}

.custom-input:focus,
.custom-select:focus,
textarea.custom-input:focus {
    border-color: rgba(124, 92, 255, 0.6);
    box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.15);
}

textarea.custom-input {
    resize: none;
    min-height: 120px;
}

.option-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.option-btn {
    background: rgba(255, 255, 255, 0.06);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 60px;
}

.option-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.loading-zone {
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.04);
    padding: 18px;
    margin-top: 14px;
    text-align: center;
}

.loading-track {
    width: 100%;
    height: 14px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 14px;
}

.loading-fill {
    width: 0%;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #ffd166, #ff8c42);
    transition: width 0.08s linear;
}

.final-glow {
    width: 94px;
    height: 94px;
    border-radius: 50%;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 900;
    background: radial-gradient(circle, rgba(45, 227, 154, 0.2), rgba(45, 227, 154, 0.06));
    border: 1px solid rgba(45, 227, 154, 0.28);
    color: #cffff0;
    box-shadow: 0 0 35px rgba(45, 227, 154, 0.18);
}

.final-title {
    font-size: 2rem;
    font-weight: 900;
}

.final-subtitle {
    color: var(--muted);
    margin-bottom: 24px;
}

.offer-card {
    max-width: 620px;
    margin: 0 auto;
}

.offer-badge {
    display: inline-block;
    margin-bottom: 12px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(45, 227, 154, 0.12);
    color: #d7fff0;
    border: 1px solid rgba(45, 227, 154, 0.22);
}

.phone-box {
    margin-top: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 18px;
    padding: 14px 16px;
}

#phoneText {
    font-size: 1.1rem;
    font-weight: 900;
    direction: ltr;
}

.btn-copy {
    border: none;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 10px 16px;
    font-weight: 700;
    cursor: pointer;
}

.secret-settings-overlay,
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 9, 20, 0.55);
    backdrop-filter: blur(12px);
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.secret-settings-box,
.custom-modal {
    width: 100%;
    max-width: 520px;
    border-radius: 26px;
    background: rgba(11, 20, 39, 0.84);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(28px);
    padding: 24px;
    box-shadow: var(--shadow);
}

.close-secret-btn {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: white;
    font-size: 1.35rem;
    cursor: pointer;
}

.setting-row {
    margin-bottom: 16px;
}

.text-muted-custom {
    color: var(--muted);
}

.d-none {
    display: none !important;
}

.shake {
    animation: shake 0.35s ease;
}

.success-flash {
    animation: successFlash 0.45s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-6px);
    }

    40% {
        transform: translateX(6px);
    }

    60% {
        transform: translateX(-4px);
    }

    80% {
        transform: translateX(4px);
    }
}

@keyframes successFlash {
    0% {
        box-shadow: 0 0 0 rgba(45, 227, 154, 0);
    }

    50% {
        box-shadow: 0 0 35px rgba(45, 227, 154, 0.18);
    }

    100% {
        box-shadow: 0 0 0 rgba(45, 227, 154, 0);
    }
}

@media (max-width: 768px) {
    .main-card {
        padding: 18px;
        border-radius: 24px;
    }

    .status-bar {
        grid-template-columns: 1fr;
    }

    .option-grid {
        grid-template-columns: 1fr;
    }

    .stage-head {
        align-items: flex-start;
    }
}

.preloader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.08), transparent 40%),
        linear-gradient(135deg, #050816 0%, #0b1020 50%, #060913 100%);
    backdrop-filter: blur(14px);
    transition: opacity 0.45s ease, visibility 0.45s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-card {
    width: min(420px, calc(100vw - 32px));
    padding: 28px 24px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    text-align: center;
}

.preloader-title {
    font-size: 1.9rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.preloader-subtitle {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.72);
    margin-bottom: 22px;
}

.preloader-bar-wrap {
    width: 100%;
    height: 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
    position: relative;
}

.preloader-bar {
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #6d5cff 0%, #00d4ff 50%, #7cff6b 100%);
    box-shadow: 0 0 18px rgba(0, 212, 255, 0.35);
    transition: width 0.08s linear;
}

.preloader-percent {
    margin-top: 16px;
    color: #fff;
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1;
}

body.is-loading {
    overflow: hidden;
}

.btn-main {
    background: linear-gradient(135deg, var(--primary, #00adb5), var(--primary-dark, #007a80));
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 173, 181, 0.3);
}

.btn-main:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 173, 181, 0.5);
    filter: brightness(1.1);
}