/* ─── تمام استایل‌ها ─── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
}
body {
    font-family: 'Vazir', 'Inter', -apple-system, sans-serif;
    background: #06060f;
    color: #f1f5f9;
    overflow-x: hidden;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
::selection {
    background: rgba(0, 240, 255, 0.25);
    color: #fff;
}

/* ─── Canvas Background ─── */
#canvas-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    display: block;
    pointer-events: none;
}
.grid-overlay {
    position: fixed;
    inset: 0;
    z-index: 1;
    background-image: linear-gradient(rgba(34, 211, 238, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(168, 85, 247, 0.02) 1px, transparent 1px);
    background-size: 64px 64px;
    pointer-events: none;
    mask-image: radial-gradient(ellipse at 50% 40%, black 25%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 40%, black 25%, transparent 70%);
}
.glow-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 1;
    opacity: 0.4;
    animation: orbFloat 12s infinite alternate ease-in-out;
}
.glow-orb--1 {
    width: 500px;
    height: 500px;
    top: -10%;
    right: -10%;
    background: radial-gradient(circle, rgba(0, 240, 255, 0.15), transparent 70%);
    animation-delay: 0s;
}
.glow-orb--2 {
    width: 400px;
    height: 400px;
    bottom: -10%;
    left: -10%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.12), transparent 70%);
    animation-delay: 4s;
}
.glow-orb--3 {
    width: 300px;
    height: 300px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(255, 77, 157, 0.06), transparent 70%);
    animation-delay: 8s;
}
@keyframes orbFloat {
    0% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -20px) scale(1.05);
    }
    66% {
        transform: translate(-20px, 30px) scale(0.95);
    }
    100% {
        transform: translate(10px, -10px) scale(1.02);
    }
}
.container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ─── Navbar ─── */
.navbar {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 48px);
    max-width: 1200px;
    padding: 12px 32px;
    border-radius: 100px;
    background: rgba(8, 8, 20, 0.6);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: 0 8px 48px rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    direction: ltr;
}
.navbar.scrolled {
    top: 16px;
    padding: 10px 28px;
    background: rgba(6, 6, 15, 0.85);
    border-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 12px 60px rgba(0, 0, 0, 0.7);
}
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #fff;
    flex-shrink: 0;
}
.logo-img {
    height: 60px;
    width: auto;
    filter: drop-shadow(0 4px 20px rgba(0, 240, 255, 0.15));
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.navbar.scrolled .logo-img {
    height: 38px;
}
.logo-text {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, #f0faff, #b77aff, #00f0ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    transition: font-size 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.navbar.scrolled .logo-text {
    font-size: 18px;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    direction: rtl;
}
.nav-links a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    font-weight: 500;
    padding: 6px 20px;
    border-radius: 40px;
    transition: all 0.25s ease;
    font-family: 'Vazir', sans-serif;
    cursor: pointer;
}
.nav-links a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.04);
}
.nav-links a.cta-link {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.12), rgba(183, 122, 255, 0.12));
    color: #7dd3fc;
    border: 1px solid rgba(0, 240, 255, 0.08);
    padding: 6px 24px;
}
.nav-links a.cta-link:hover {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(183, 122, 255, 0.2));
    border-color: rgba(0, 240, 255, 0.2);
    transform: scale(1.02);
}
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 4px;
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
}
.mobile-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 4px;
    transition: all 0.3s ease;
}
.mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
    width: 24px;
}
.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 24px;
}

/* ─── Page Header ─── */
.page-header {
    padding: 140px 0 40px;
    text-align: center;
    position: relative;
    z-index: 2;
}
.page-header .section-title {
    font-size: clamp(32px, 4.5vw, 52px);
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #f0faff, #b77aff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.page-header .section-desc {
    color: rgba(255, 255, 255, 0.35);
    max-width: 600px;
    margin: 8px auto 0;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.9;
}

/* ─── Podium ─── */
.podium-section {
    padding: 20px 0 50px;
    position: relative;
    z-index: 2;
}
.podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 20px;
    padding: 20px 0;
    min-height: 320px;
}
.podium-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
}
.podium-item .avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.1);
    margin-bottom: 8px;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
}
.podium-item .avatar .medal-big {
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 28px;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.3));
}
.podium-item .name {
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
}
.podium-item .score {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.2);
}
.podium-item .podium-base {
    width: 100%;
    text-align: center;
    padding: 6px 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    margin-top: 4px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.15);
}
.podium-item.first {
    transform: scale(1.15);
    margin-bottom: -10px;
}
.podium-item.first .avatar {
    width: 100px;
    height: 100px;
    border-color: rgba(251, 191, 36, 0.3);
    box-shadow: 0 0 60px rgba(251, 191, 36, 0.08), 0 0 120px rgba(251, 191, 36, 0.03);
    animation: glowGold 3s infinite alternate ease-in-out;
}
@keyframes glowGold {
    0% {
        box-shadow: 0 0 40px rgba(251, 191, 36, 0.05), 0 0 80px rgba(251, 191, 36, 0.02);
    }
    100% {
        box-shadow: 0 0 80px rgba(251, 191, 36, 0.12), 0 0 160px rgba(251, 191, 36, 0.05);
    }
}
.podium-item.first .avatar .medal-big {
    font-size: 36px;
    top: -12px;
    right: -12px;
    animation: medalSpin 4s infinite linear;
}
@keyframes medalSpin {
    0% {
        transform: rotate(0deg) scale(1);
    }
    50% {
        transform: rotate(180deg) scale(1.1);
    }
    100% {
        transform: rotate(360deg) scale(1);
    }
}
.podium-item.first .name {
    font-size: 20px;
    color: #fbbf24;
    font-weight: 800;
}
.podium-item.first .score {
    color: rgba(251, 191, 36, 0.5);
    font-size: 15px;
}
.podium-item.first .podium-base {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.08), rgba(251, 191, 36, 0.02));
    border-color: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
}
.podium-item.second .avatar {
    border-color: rgba(209, 213, 219, 0.2);
    box-shadow: 0 0 40px rgba(209, 213, 219, 0.04);
}
.podium-item.second .name {
    color: #d1d5db;
}
.podium-item.second .podium-base {
    background: linear-gradient(135deg, rgba(209, 213, 219, 0.05), rgba(209, 213, 219, 0.01));
    border-color: rgba(209, 213, 219, 0.06);
    color: #d1d5db;
}
.podium-item.third .avatar {
    border-color: rgba(217, 119, 6, 0.15);
    box-shadow: 0 0 30px rgba(217, 119, 6, 0.03);
}
.podium-item.third .name {
    color: #d97706;
}
.podium-item.third .podium-base {
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.05), rgba(217, 119, 6, 0.01));
    border-color: rgba(217, 119, 6, 0.06);
    color: #d97706;
}
.podium-item .avatar .rank-number {
    font-size: 14px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.05);
}

/* ─── Filters ─── */
.filters-section {
    padding: 10px 0 30px;
    position: relative;
    z-index: 2;
}
.filters-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    padding: 16px 24px;
}
.filter-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.filter-group .filter-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.15);
    font-weight: 500;
    margin-left: 4px;
}
.filter-btn {
    padding: 6px 18px;
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    background: rgba(255, 255, 255, 0.02);
    color: rgba(255, 255, 255, 0.25);
    font-family: 'Vazir', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}
.filter-btn:hover {
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.5);
}
.filter-btn.active {
    background: rgba(0, 240, 255, 0.06);
    border-color: rgba(0, 240, 255, 0.1);
    color: #7dd3fc;
}
.filter-divider {
    width: 1px;
    height: 28px;
    background: rgba(255, 255, 255, 0.03);
}

/* ─── Questions Grid ─── */
.questions-list-section {
    padding: 10px 0 40px;
    position: relative;
    z-index: 2;
}
.questions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.question-card {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    padding: 20px 18px 18px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}
.question-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.04), rgba(183, 122, 255, 0.04));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    transition: all 0.4s ease;
}
.question-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 240, 255, 0.06);
    background: rgba(255, 255, 255, 0.025);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}
.question-card:hover::before {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.08), rgba(183, 122, 255, 0.08));
}
.question-card .q-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}
.question-card .q-title {
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    flex: 1;
}
.question-card .q-badge-level {
    font-size: 11px;
    padding: 2px 12px;
    border-radius: 40px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.15);
    font-weight: 500;
    flex-shrink: 0;
    margin-right: 8px;
}
.question-card .q-badge-level.easy {
    color: #34d399;
    border-color: rgba(52, 211, 153, 0.1);
}
.question-card .q-badge-level.medium {
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.1);
}
.question-card .q-badge-level.hard {
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.1);
}
.question-card .q-desc {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.2);
    line-height: 1.8;
    margin: 4px 0 12px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.question-card .q-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.02);
    flex-wrap: wrap;
    gap: 8px;
}
.question-card .q-footer .q-stats {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.1);
}
.question-card .q-footer .q-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}
.question-card .q-footer .q-stats .solved-count {
    color: rgba(52, 211, 153, 0.3);
}
.question-card .q-footer .q-stats .like-count {
    color: rgba(251, 191, 36, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}
.question-card .q-footer .q-stats .like-count:hover {
    color: #fbbf24;
}
.question-card .q-footer .q-stats .like-count.liked {
    color: #fbbf24;
}
.question-card .q-footer .q-stats .view-count {
    color: rgba(0, 240, 255, 0.2);
}
.question-card .q-footer .q-points {
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.35);
    white-space: nowrap;
}
.question-card .q-footer .q-points .q-points-partial {
    font-size: 11px;
    font-weight: 500;
    color: #fbbf24;
}

/* ─── نوار پیشرفت سوال‌های نیمه‌حل‌شده ─── */
.question-card .q-progress {
    position: relative;
    height: 6px;
    margin: 10px 0 4px;
    border-radius: 40px;
    background: rgba(0, 240, 255, 0.08);
    border: 1px solid rgba(0, 240, 255, 0.14);
    overflow: hidden;
}
.question-card .q-progress > span {
    display: block;
    height: 100%;
    border-radius: 40px;
    background: linear-gradient(90deg, #00f0ff, #b77aff);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.55);
    transition: width 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}
.question-card .q-footer .q-actions button.btn-solve.partial {
    background: linear-gradient(135deg, #3a2a12, #43301b);
    border: 1px solid #7a5a24;
    color: #fbbf24;
}
.question-card .q-footer .q-actions {
    display: flex;
    gap: 6px;
}
.question-card .q-footer .q-actions button {
    padding: 4px 16px;
    border-radius: 40px;
    border: none;
    font-family: 'Vazir', sans-serif;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.03);
}
.question-card .q-footer .q-actions .btn-solve {
    background: rgba(0, 240, 255, 0.04);
    color: rgba(0, 240, 255, 0.3);
    border-color: rgba(0, 240, 255, 0.04);
}
.question-card .q-footer .q-actions .btn-solve:hover {
    background: rgba(0, 240, 255, 0.08);
    color: #7dd3fc;
    border-color: rgba(0, 240, 255, 0.08);
}
.question-card .q-footer .q-actions .btn-solve.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: rgba(52, 211, 153, 0.05);
    color: #34d399;
    border-color: rgba(52, 211, 153, 0.1);
}
.question-card .q-footer .q-actions .btn-solve.disabled:hover {
    transform: none;
    box-shadow: none;
}
.question-card .q-footer .q-actions .btn-like {
    font-size: 15px;
    padding: 4px 10px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.05);
}
.question-card .q-footer .q-actions .btn-like:hover {
    color: #fbbf24;
}
.question-card .q-footer .q-actions .btn-like.liked {
    color: #fbbf24;
}

/* ─── Load More ─── */
.load-more-wrapper {
    text-align: center;
    margin-top: 30px;
}
.btn-load-more {
    padding: 12px 40px;
    border-radius: 60px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    background: rgba(255, 255, 255, 0.02);
    color: rgba(255, 255, 255, 0.2);
    font-family: 'Vazir', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-load-more:hover {
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.06);
}
.btn-load-more:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ─── Modal ─── */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(6, 6, 15, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.modal-overlay.active {
    display: flex;
}
.modal-solve {
    background: rgba(10, 10, 20, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 32px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px 32px 24px;
    position: relative;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}
.modal-solve::-webkit-scrollbar {
    width: 4px;
}
.modal-solve::-webkit-scrollbar-track {
    background: transparent;
}
.modal-solve::-webkit-scrollbar-thumb {
    background: rgba(0, 240, 255, 0.15);
    border-radius: 8px;
}
.modal-solve .modal-close {
    position: absolute;
    top: 16px;
    left: 20px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.1);
    font-size: 28px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Vazir', sans-serif;
}
.modal-solve .modal-close:hover {
    color: rgba(255, 255, 255, 0.4);
    transform: rotate(90deg);
}
.modal-solve .modal-header {
    margin-bottom: 20px;
    padding-left: 40px;
}
.modal-solve .modal-header .modal-title {
    font-size: 26px;
    font-weight: 800;
    background: linear-gradient(135deg, #f0faff, #b77aff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.modal-solve .modal-header .modal-meta {
    display: flex;
    gap: 10px;
    margin-top: 6px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.15);
    flex-wrap: wrap;
}
.modal-solve .modal-header .modal-meta span {
    background: rgba(255, 255, 255, 0.02);
    padding: 2px 14px;
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}
.modal-solve .modal-body .problem-desc {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 16px;
}
.modal-solve .modal-body .problem-desc p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 2.2;
}
.modal-solve .modal-body .problem-desc .hint {
    font-size: 14px;
    color: rgba(0, 240, 255, 0.3);
    background: rgba(0, 240, 255, 0.02);
    padding: 8px 14px;
    border-radius: 12px;
    border: 1px solid rgba(0, 240, 255, 0.03);
    margin-top: 8px;
}
.modal-solve .modal-body .code-editor {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 16px;
}
.modal-solve .modal-body .code-editor .editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    flex-wrap: wrap;
    gap: 6px;
}
.modal-solve .modal-body .code-editor .editor-header .editor-lang {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.1);
}
.modal-solve .modal-body .code-editor .editor-header .editor-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.modal-solve .modal-body .code-editor .editor-header .editor-actions button {
    padding: 4px 14px;
    border-radius: 40px;
    border: none;
    font-family: 'Vazir', sans-serif;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}
.modal-solve .modal-body .code-editor .editor-header .editor-actions .btn-upload {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(251, 191, 36, 0.05));
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.15);
}
.modal-solve .modal-body .code-editor .editor-header .editor-actions .btn-upload:hover {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.25), rgba(251, 191, 36, 0.1));
    border-color: rgba(251, 191, 36, 0.3);
    box-shadow: 0 4px 20px rgba(251, 191, 36, 0.1);
}
.modal-solve .modal-body .code-editor .editor-header .editor-actions #resetCodeBtn {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.modal-solve .modal-body .code-editor .editor-header .editor-actions #resetCodeBtn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.6);
}
.modal-solve .modal-body .code-editor textarea {
    width: 100%;
    min-height: 200px;
    background: transparent;
    border: none;
    outline: none;
    padding: 16px 18px;
    color: rgba(255, 255, 255, 0.85);
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    resize: vertical;
    line-height: 1.8;
    direction: ltr;
    text-align: left;
    tab-size: 4;
}
.modal-solve .modal-body .code-editor textarea::placeholder {
    color: rgba(255, 255, 255, 0.1);
}
.modal-solve .modal-body .code-editor textarea:focus {
    color: #fff;
}
.modal-solve .modal-body .output-area {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 12px 18px;
    min-height: 60px;
    margin-bottom: 16px;
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.1);
    direction: ltr;
    text-align: left;
    white-space: pre-wrap;
    word-break: break-all;
}
.modal-solve .modal-body .output-area.success {
    color: #34d399;
    border-color: rgba(52, 211, 153, 0.05);
}
.modal-solve .modal-body .output-area.error {
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.05);
}
.modal-solve .modal-body .output-area.warning {
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.05);
}

/* ─── Like Dialog ─── */
.like-dialog {
    display: none;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 16px;
    text-align: center;
}
.like-dialog.active {
    display: block;
}
.like-dialog .like-question {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 12px;
}
.like-dialog .like-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
}
.like-dialog .like-buttons button {
    padding: 10px 32px;
    border-radius: 40px;
    border: none;
    font-family: 'Vazir', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}
.like-dialog .like-buttons .btn-like-yes {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(251, 191, 36, 0.05));
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.15);
}
.like-dialog .like-buttons .btn-like-yes:hover {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.3), rgba(251, 191, 36, 0.1));
    border-color: rgba(251, 191, 36, 0.3);
    transform: scale(1.05);
}
.like-dialog .like-buttons .btn-like-no {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.03);
}
.like-dialog .like-buttons .btn-like-no:hover {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.4);
}
.like-dialog .like-result {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.2);
    margin-top: 10px;
}

/* ─── Modal Footer ─── */
.modal-solve .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.02);
    flex-wrap: wrap;
}
.modal-solve .modal-footer button {
    padding: 10px 28px;
    border-radius: 60px;
    border: none;
    font-family: 'Vazir', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}
.modal-solve .modal-footer .btn-run {
    background: linear-gradient(135deg, #00f0ff, #0088cc);
    color: #fff;
    border: 1px solid rgba(0, 240, 255, 0.3);
    box-shadow: 0 4px 20px rgba(0, 240, 255, 0.2);
}
.modal-solve .modal-footer .btn-run:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 40px rgba(0, 240, 255, 0.4);
}
.modal-solve .modal-footer .btn-submit {
    background: linear-gradient(135deg, #34d399, #059669);
    color: #fff;
    border: 1px solid rgba(52, 211, 153, 0.3);
    box-shadow: 0 4px 20px rgba(52, 211, 153, 0.2);
}
.modal-solve .modal-footer .btn-submit:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 40px rgba(52, 211, 153, 0.4);
}
.modal-solve .modal-footer .btn-close-modal {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.03);
}
.modal-solve .modal-footer .btn-close-modal:hover {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.4);
}

/* ─── File Input ─── */
#fileInput {
    display: none;
}

/* ─── Rocket Overlay ─── */
.rocket-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    pointer-events: none;
    overflow: hidden;
}
.rocket-overlay.active {
    display: flex;
    pointer-events: auto;
}

.rocket-container {
    position: absolute;
    bottom: -350px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 280px;
    /* تغییر سرعت موشک به ۲.۴ ثانیه (مطابق فایل تست) */
    transition: bottom 2.4s cubic-bezier(0.22, 0.61, 0.36, 1);
    z-index: 9999;
    filter: drop-shadow(0 0 60px rgba(255, 120, 0, 0.4));
}
.rocket-container.launch {
    bottom: 50%;
    transform: translateX(-50%) translateY(50%);
}
.rocket-container svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* ─── Tick Overlay ─── */
.tick-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    background: transparent !important;
}
.tick-overlay.active {
    display: flex;
}
.tick-overlay .tick {
    font-size: 200px;
    color: #34d399;
    text-shadow: 0 0 80px rgba(52, 211, 153, 0.6), 0 0 160px rgba(52, 211, 153, 0.3);
    animation: tickAppear 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    font-weight: 900;
    font-family: Arial, sans-serif;
}
@keyframes tickAppear {
    0% {
        transform: scale(0) rotate(-30deg);
        opacity: 0;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* ─── Big X ─── */
.big-x-overlay {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    background: transparent !important;
}
.big-x-overlay.active {
    display: flex;
}
.big-x-overlay .big-x {
    font-size: 180px;
    color: #ff1744;
    text-shadow: 0 0 80px rgba(255, 0, 0, 0.6), 0 0 160px rgba(255, 0, 0, 0.25);
    animation: xAppear 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    font-weight: 900;
    font-family: Arial, sans-serif;
}
@keyframes xAppear {
    0% {
        transform: scale(0) rotate(-30deg);
        opacity: 0;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* ─── Canvas برای شهاب‌سنگ‌ها ─── */
#meteorCanvas {
    position: fixed;
    inset: 0;
    z-index: 9998;
    pointer-events: none;
    display: none;
}
#meteorCanvas.active {
    display: block;
}

/* ─── Footer ─── */
.main-footer {
    position: relative;
    z-index: 2;
    background: rgba(6, 6, 15, 0.4);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    padding: 60px 0 0;
    margin-top: auto;
    overflow: hidden;
}
.footer-container {
    position: relative;
    z-index: 1;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 32px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 48px 32px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}
.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.footer-brand .tagline {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.3);
    line-height: 1.9;
    max-width: 340px;
    font-weight: 400;
}
.social-links {
    display: flex;
    gap: 10px;
    margin-top: 4px;
    flex-wrap: wrap;
}
.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.25);
    text-decoration: none;
    font-size: 20px;
    transition: all 0.35s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
}
.social-links a:hover {
    background: rgba(0, 240, 255, 0.04);
    border-color: rgba(0, 240, 255, 0.12);
    color: #00f0ff;
    transform: translateY(-4px) scale(1.06);
    box-shadow: 0 8px 30px rgba(0, 240, 255, 0.04);
}
.footer-col h4 {
    font-size: 14px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.5px;
    margin-bottom: 18px;
    position: relative;
    padding-bottom: 10px;
}
.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 28px;
    height: 2.5px;
    background: linear-gradient(90deg, #00f0ff, #b77aff);
    border-radius: 4px;
    opacity: 0.4;
    transition: width 0.3s ease;
}
.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.footer-col ul li a {
    color: rgba(255, 255, 255, 0.25);
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
    padding-right: 0;
}
.footer-col ul li a::before {
    content: '›';
    opacity: 0;
    transform: translateX(-8px);
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    color: #00f0ff;
    font-weight: 700;
    font-size: 18px;
}
.footer-col ul li a:hover {
    color: #ffffff;
    transform: translateX(6px);
}
.footer-col ul li a:hover::before {
    opacity: 1;
    transform: translateX(0);
}
.footer-newsletter h4 {
    font-size: 14px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.5px;
    margin-bottom: 18px;
    padding-bottom: 10px;
    position: relative;
}
.footer-newsletter h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 28px;
    height: 2.5px;
    background: linear-gradient(90deg, #00f0ff, #b77aff);
    border-radius: 4px;
    opacity: 0.4;
    transition: width 0.3s ease;
}
.footer-newsletter p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.25);
    line-height: 1.9;
    margin-bottom: 20px;
}
.newsletter-form {
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 60px;
    padding: 4px;
    transition: all 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}
.newsletter-form:focus-within {
    border-color: rgba(0, 240, 255, 0.2);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 0 40px rgba(0, 240, 255, 0.02);
}
.newsletter-form input {
    flex: 1;
    padding: 10px 18px;
    background: transparent;
    border: none;
    outline: none;
    color: #f1f5f9;
    font-family: 'Vazir', sans-serif;
    font-size: 14px;
    min-width: 0;
    direction: rtl;
}
.newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.15);
    font-weight: 300;
}
.newsletter-form button {
    padding: 10px 28px;
    border: none;
    border-radius: 60px;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.08), rgba(183, 122, 255, 0.08));
    color: #7dd3fc;
    font-family: 'Vazir', sans-serif;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.23, 1, 0.32, 1);
    white-space: nowrap;
    border: 1px solid rgba(0, 240, 255, 0.06);
    position: relative;
    overflow: hidden;
}
.newsletter-form button:hover {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.15), rgba(183, 122, 255, 0.15));
    border-color: rgba(0, 240, 255, 0.15);
    transform: scale(1.03);
    box-shadow: 0 8px 30px rgba(0, 240, 255, 0.04);
}
.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0 28px;
    gap: 12px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.02);
    margin-top: 0;
}
.footer-bottom .copyright {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.15);
    font-weight: 400;
    letter-spacing: 0.3px;
}
.footer-bottom .copyright .heart {
    color: #ff4d94;
    display: inline-block;
    animation: heartBeat 2s infinite ease-in-out;
}
@keyframes heartBeat {
    0%,
    100% {
        transform: scale(1);
    }
    15% {
        transform: scale(1.25);
    }
    30% {
        transform: scale(1);
    }
    45% {
        transform: scale(1.15);
    }
    60% {
        transform: scale(1);
    }
}
.footer-bottom .footer-legal {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}
.footer-bottom .footer-legal a {
    color: rgba(255, 255, 255, 0.12);
    text-decoration: none;
    font-size: 13px;
    font-weight: 400;
    transition: all 0.3s ease;
    position: relative;
}
.footer-bottom .footer-legal a:hover {
    color: rgba(255, 255, 255, 0.5);
}
.footer-bottom .footer-legal .divider {
    color: rgba(255, 255, 255, 0.03);
    font-size: 18px;
    font-weight: 300;
    line-height: 1;
}
.footer-bottom .back-to-top {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.12);
    text-decoration: none;
    font-size: 13px;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    padding: 4px 8px;
    border-radius: 20px;
}
.footer-bottom .back-to-top:hover {
    color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.02);
}
.footer-bottom .back-to-top .arrow-up {
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    font-size: 16px;
}
.footer-bottom .back-to-top:hover .arrow-up {
    transform: translateY(-4px) scale(1.2);
    color: #00f0ff;
}

/* ─── Responsive ─── */
@media (max-width: 992px) {
    .questions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px 32px;
    }
    .rocket-container {
        width: 160px;
        height: 220px;
    }
}
@media (max-width: 768px) {
    .navbar {
        padding: 10px 20px;
        top: 16px;
        width: calc(100% - 32px);
        border-radius: 60px;
    }
    .navbar.scrolled {
        padding: 8px 16px;
        top: 12px;
    }
    .logo-img {
        height: 44px;
    }
    .navbar.scrolled .logo-img {
        height: 32px;
    }
    .logo-text {
        font-size: 20px;
    }
    .navbar.scrolled .logo-text {
        font-size: 14px;
    }
    .nav-links a:not(.cta-link) {
        display: none;
    }
    .nav-links a.cta-link {
        font-size: 13px;
        padding: 4px 16px;
    }
    .mobile-toggle {
        display: flex;
    }
    .page-header {
        padding: 120px 0 30px;
    }
    .podium {
        gap: 12px;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 10px 4px;
        justify-content: center;
    }
    .podium-item.first {
        transform: scale(1.05);
    }
    .podium-item.first .avatar {
        width: 80px;
        height: 80px;
    }
    .podium-item .avatar {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    .podium-item .name {
        font-size: 13px;
    }
    .podium-item.first .name {
        font-size: 16px;
    }
    .podium-item .podium-base {
        font-size: 11px;
        padding: 4px 10px;
    }
    .filters-wrapper {
        padding: 12px 16px;
        gap: 8px;
    }
    .filter-group .filter-label {
        font-size: 12px;
    }
    .filter-btn {
        font-size: 12px;
        padding: 4px 12px;
    }
    .filter-divider {
        display: none;
    }
    .questions-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .modal-solve {
        padding: 24px 16px 20px;
        max-height: 95vh;
    }
    .modal-solve .modal-header .modal-title {
        font-size: 20px;
    }
    .modal-solve .modal-body .code-editor textarea {
        min-height: 140px;
        font-size: 13px;
        padding: 12px 14px;
    }
    .modal-solve .modal-footer {
        justify-content: center;
    }
    .modal-solve .modal-footer button {
        padding: 8px 20px;
        font-size: 13px;
    }
    .footer-container {
        padding: 0 20px;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .footer-bottom {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .newsletter-form {
        flex-direction: column;
        background: transparent;
        border: none;
        padding: 0;
        gap: 10px;
    }
    .newsletter-form input {
        padding: 12px 18px;
        background: rgba(255, 255, 255, 0.02);
        border: 1px solid rgba(255, 255, 255, 0.04);
        border-radius: 60px;
    }
    .newsletter-form button {
        width: 100%;
        justify-content: center;
    }
    .footer-brand .tagline {
        max-width: 100%;
    }
    .rocket-container {
        width: 120px;
        height: 160px;
    }
    .tick-overlay .tick {
        font-size: 120px;
    }
    .big-x-overlay .big-x {
        font-size: 120px;
    }
}
@media (max-width: 420px) {
    .logo-img {
        height: 34px;
    }
    .logo-text {
        font-size: 16px;
    }
    .navbar.scrolled .logo-img {
        height: 26px;
    }
    .navbar.scrolled .logo-text {
        font-size: 12px;
    }
    .podium-item.first .avatar {
        width: 64px;
        height: 64px;
    }
    .podium-item .avatar {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    .podium-item.first .name {
        font-size: 14px;
    }
    .podium-item .name {
        font-size: 12px;
    }
    .question-card {
        padding: 16px 14px;
    }
    .question-card .q-title {
        font-size: 14px;
    }
    .question-card .q-footer .q-actions button {
        font-size: 11px;
        padding: 3px 12px;
    }
    .modal-solve .modal-body .code-editor .editor-header .editor-actions button {
        font-size: 10px;
        padding: 3px 10px;
    }
    .rocket-container {
        width: 90px;
        height: 120px;
    }
    .tick-overlay .tick {
        font-size: 80px;
    }
    .big-x-overlay .big-x {
        font-size: 80px;
    }
}
