:root {
    --glass-bg: rgba(15, 20, 30, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --accent: #3b82f6;
}

.sub-info{
    color:#aaa;
    font-size:13px;
    margin-bottom:20px;
}

.btn-res{
    width:100%;
    padding:10px;
    border:none;
    border-radius:10px;
    background:linear-gradient(135deg,#ff00ff,#00ffff);
                    color:white;
                    font-weight:bold;
                    cursor:pointer;
                    transition:0.3s;
}
body {
    margin: 0;
    padding: 0;
    background: #05070a;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    direction: rtl;
    color: white;
    overflow-x: hidden;
    font-family: 'IRANSansXV', sans-serif;
    padding: 50px 0; 
}

.main-wrapper {
    display: flex;
    width: 90%;
    max-width: 1100px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(15px); 
    -webkit-backdrop-filter: blur(15px);
    border-radius: 24px;
    overflow: hidden;
    z-index: 10;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

@media (min-width: 900px) {
    .main-wrapper {
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
    }
}

.left-side {
    flex: 1;
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border-left: 1px solid var(--glass-border);
}

.brand-name {
    font-size: 32px;
    font-weight: 700;
    margin: 10px 0;
}
.brand-name span { color: var(--accent); }

.games-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 30px 0;
}

.game-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 15px;
    border-radius: 15px;
    border: 1px solid var(--glass-border);
    transition: 0.3s;
}

.game-item:hover {
    background: rgba(255, 255, 255, 0.07);
    transform: translateY(-5px);
}

.game-item img {
    width: 50px;
    height: 50px;
    display: block;
    margin: 0 auto 10px;
}

.register-panel {
    flex: 1;
    padding: 50px;
    background: rgba(0, 0, 0, 0.2);
}

.input-group {
    margin-bottom: 15px;
    text-align: right;
}

.input-group label {
    display: block;
    font-size: 12px;
    color: #888;
    margin-bottom: 5px;
    margin-right: 5px;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

input {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 12px;
    color: white !important;
    font-size: 14px;
    box-sizing: border-box;
    transition: 0.3s;
}

input:focus {
    outline: none;
    border-color: var(--accent) !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background: var(--accent);
    color: white;
    border: none;
    font-size: 30px;
    font-family: 'IRANSansXV';
    border-radius: 12px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
    transition: 0.3s;
}

.submit-btn:hover {
    filter: brightness(1.2);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
}

@media (max-width: 850px) {
    .main-wrapper {
        flex-direction: column;
        margin: 20px 0;
    }
    .left-side {
        padding: 30px;
        order: 2; 
    }
    .register-panel {
        padding: 30px;
        order: 1;
    }
    .input-row {
        grid-template-columns: 1fr;
    }
}

.extorm-captcha {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-top: 15px;
}

#galaxyCanvas {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1;
}
    
.rules-acceptance {
    margin-top: 20px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #ccc;
}

.rules-acceptance input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent); 
    cursor: pointer;
}

.rules-acceptance a {
    color: var(--accent);
    font-weight: bold;
    transition: 0.25s;
}

.rules-acceptance a:hover {
    color: #60a5fa;
    text-shadow: 0 0 8px rgba(59,130,246,0.6);
}
.login-text {
    margin-top: 20px;
    text-align: center;
    font-size: 13px;
    color: #aaa;
}

.login-text a {
    color: var(--accent);
    font-weight: 700;
    transition: 0.3s;
}

.login-text a:hover {
    color: #60a5fa;
    text-shadow: 0 0 10px rgba(59,130,246,0.5);
}

#otpInputs input {
    width: 40px;
    height: 45px;
    font-size: 22px;
    text-align: center;
    border-radius: 10px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    transition: 0.3s;
}

#otpInputs input:focus {
    outline: none;
    border-color: #3b82f6;
    background: rgba(255,255,255,0.1);
}

#otpInputs.shake {
    animation: shake 0.3s;
}

@keyframes shake {
    0% { transform: translateX(0); }
    20% { transform: translateX(-5px); }
    40% { transform: translateX(5px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(5px); }
    100% { transform: translateX(0); }
}
#otpInputs {
    display: flex;
    gap: 10px;
    justify-content: center;
    direction: ltr; 
}

.main-logo {
    width: 700px;
    max-width: 60%;
    height: auto;
    object-fit: contain;
}

@media (max-width: 650px) {

    .main-wrapper {
        width: 94%;
        border-radius: 18px;
    }

    .left-side {
        padding: 25px 20px;
    }

    .register-panel {
        padding: 25px 20px;
    }

    .main-logo {
        width: 150px;
        max-width: 70%;
    }

    .brand-name {
        font-size: 26px;
    }

    .games-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin: 25px 0;
    }

    .game-item img {
        width: 40px;
        height: 40px;
    }

    .game-item {
        padding: 12px;
        font-size: 13px;
    }
    
    input {
        padding: 12px;
        font-size: 13px;
    }

    .submit-btn {
        padding: 12px;
        font-size: 14px;
    }

    /* OTP */
    #otpInputs input {
        width: 35px;
        height: 42px;
        font-size: 18px;
    }
    .switch-btn {
        display: none;
    }
}

@media (max-width: 450px) {

    .main-logo {
        width: 120px;
        max-width: 80%;
    }

    .brand-name {
        font-size: 22px;
    }

    .game-item {
        padding: 10px;
    }

    .left-side {
        padding: 20px 10px;
    }

    .register-panel {
        padding: 20px 10px;
    }

    h1.glitch {
        font-size: 22px !important;
    }

    #otpInputs {
        gap: 6px;
    }
}
.error-box {
    position: fixed;
    top: -120px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(140deg, rgba(255,0,80,0.4), rgba(255,0,0,0.25));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 18px 25px;
    border-radius: 16px;
    border: 1px solid rgba(255,0,0,0.25);
    color: #fff;
    font-size: 15px;
    font-weight: bold;
    text-align: center;
    width: calc(100% - 40px);
    max-width: 450px;
    z-index: 9999;
    box-shadow: 0 5px 30px rgba(255, 0, 0, 0.4);
    opacity: 0;
    transition: all .45s cubic-bezier(.4,0,.2,1);
}

.error-box.active {
    top: 20px;
    opacity: 1;
}

.glitch-error {
    animation: glitchAnim 0.4s linear 1;
}

@keyframes glitchAnim {
    0% { transform: translate(0) }
    20% { transform: translate(-2px, 2px) }
    40% { transform: translate(2px, -2px) }
    60% { transform: translate(-1px, 1px) }
    80% { transform: translate(1px, -1px) }
    100% { transform: translate(0) }
}
.switch-btn {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #ff00ff, #00ffff);
    border: none;
    color: white;
    padding: 15px 25px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 12px;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 0 30px rgba(0,255,255,0.3);
    transition: 0.4s ease;
}

.switch-btn:hover {
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow: 0 0 45px rgba(255,0,255,0.5);
}

.main-wrapper.switched {
    flex-direction: row-reverse;
    transform: scale(1.02);
}

.main-wrapper {
    transition: transform 0.8s cubic-bezier(0.68,-0.55,0.27,1.55);
}
.main-wrapper, .left-side, .register-panel {
    will-change: transform, opacity;
}
.main-wrapper::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,0.06), transparent 60%);
    pointer-events: none;
    transition: background 0.2s ease-out;
    z-index: 1;
}

@media (max-width: 850px) {
    .main-wrapper.switched {
        flex-direction: column;
    }
}

.theme-toggle {
    position: absolute;
    top: calc(50% + 80px);
    left: 50%;
    transform: translateX(-50%);
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: linear-gradient(135deg, #facc15, #f97316);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 0 20px rgba(250, 204, 21, 0.4);
    transition: 0.4s ease;
}

/* موبایل */
@media (max-width: 850px) {
    .theme-toggle {
        position: fixed;
        bottom: 25px;
        left: 20px;
        top: auto;
        transform: none;
        width: 50px;
        height: 50px;
    }
}

.theme-toggle svg {
    width: 26px;
    height: 26px;
    stroke: white;
    stroke-width: 2;
    fill: none;
    transition: transform 0.5s ease, opacity 0.4s ease;
}

.theme-toggle.active {
    background: linear-gradient(135deg, #334155, #0f172a);
    box-shadow: 0 0 25px rgba(59,130,246,0.4);
}

.theme-toggle.active .sun-icon {
    opacity: 0;
    transform: scale(0.5) rotate(90deg);
}

.theme-toggle.active .moon-icon {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.moon-icon {
    position: absolute;
    opacity: 0;
    transform: scale(0.5) rotate(-90deg);
}

.light-mode {
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.1);
    --accent: #2563eb;
    color: #111;
    background: #f3f4f6;
}

.light-mode body {
    background: #e5e7eb;
    color: #111;
}

.light-mode input {
    background: rgba(255,255,255,0.8)!important;
    color: #111!important;
    border-color: rgba(0,0,0,0.1)!important;
}

.light-mode .register-panel {
    background: rgba(255,255,255,0.5);
}

.light-mode .game-item {
    background: rgba(255,255,255,0.5);
    border-color: rgba(0,0,0,0.1);
}

.light-mode .submit-btn {
    background: var(--accent);
    color:white;
}

.light-mode .switch-btn,
.light-mode .swap-btn {
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    color: white;
}

.light-mode .error-box {
    background: linear-gradient(120deg, rgba(255,90,90,0.2), rgba(255,0,0,0.1));
    color: #000;
}

.main-wrapper {
    position: relative;
}

@media (min-width: 850px) {
    .main-wrapper {
        perspective: 1400px;
    }
}


.left-side,
.register-panel {
    transition: transform 0.8s cubic-bezier(.68,-0.55,.27,1.55),
                opacity 0.5s ease;
    transform-origin: center;
}

.main-wrapper.switched .left-side {
    transform: translateX(100%) rotateY(-15deg) scale(0.9);
    opacity: 0.6;
}

.main-wrapper.switched .register-panel {
    transform: translateX(-100%) rotateY(15deg) scale(1.05);
    opacity: 1;
}

.main-wrapper:not(.switched) .left-side {
    transform: translateX(0) rotateY(0deg) scale(1);
    opacity: 1;
}

.main-wrapper:not(.switched) .register-panel {
    transform: translateX(0) rotateY(0deg) scale(1);
    opacity: 1;
}