/* ============ RESPONSIVE DESIGN - NARCO SYNDICATE ============ */

/* ============ BREAKPOINT: 1024px (Tablet Landscape) ============ */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    .hero-container {
        left: 5%;
    }
    
    .hero img:nth-child(2) {
        width: 60%;
        right: -5rem;
    }
    
    .quick-nav {
        left: 0.5rem;
    }
    
    .quick-nav-item span:last-child {
        display: none;
    }
    
    .quick-nav-item {
        padding: 0.5rem;
        justify-content: center;
    }
}

/* ============ BREAKPOINT: 768px (Tablet Portrait) ============ */
@media (max-width: 768px) {
    /* ===== HEADER ===== */
    .hamburger-btn {
        display: flex;
    }
    
    nav {
        position: relative;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 0;
        gap: 1rem;
    }
    
    .logo {
        z-index: 1001;
        order: 1;
        margin-right: auto;
    }
    
    .logo span {
        font-size: 1.1rem;
    }
    
    .logo img {
        width: 35px;
        height: 35px;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        left: -100%;
        width: 75%;
        max-width: 300px;
        height: auto;
        max-height: 70vh;
        background: rgba(15, 15, 15, 0.98);
        backdrop-filter: blur(15px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        gap: 0;
        padding: 5rem 1.5rem 2rem;
        margin-top: 70px;
        z-index: 1000;
        transition: left 0.4s cubic-bezier(0.3, 0, 0, 1);
        border-right: 1px solid var(--primary-border);
        border-bottom: 1px solid var(--primary-border);
        border-radius: 0 0 16px 0;
        box-shadow: 10px 10px 30px rgba(0, 0, 0, 0.5);
        overflow-y: auto;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .nav-links li {
        opacity: 0;
        transform: translateX(-30px);
        transition: all 0.4s cubic-bezier(0.3, 0, 0, 1);
    }
    
    .nav-links.active li {
        opacity: 1;
        transform: translateX(0);
    }
    
    .nav-links.active li:nth-child(1) { transition-delay: 0.1s; }
    .nav-links.active li:nth-child(2) { transition-delay: 0.15s; }
    .nav-links.active li:nth-child(3) { transition-delay: 0.2s; }
    .nav-links.active li:nth-child(4) { transition-delay: 0.25s; }
    .nav-links.active li:nth-child(5) { transition-delay: 0.3s; }
    .nav-links.active li:nth-child(6) { transition-delay: 0.35s; }
    
    .nav-links a {
        display: block;
        font-size: 1rem;
        padding: 0.8rem 1rem;
        width: 100%;
        text-align: right;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        color: var(--text-light);
    }
    
    .connect-btn {
        display: none;
    }
    
    .mobile-only {
        display: block;
    }
    
    .mobile-only .connect-btn {
        display: block;
        width: 100%;
        text-align: center;
        padding: 0.8rem;
        margin-top: 0.5rem;
        border-radius: 8px;
        font-size: 0.9rem;
    }

    /* ===== HERO ===== */
    .hero {
        height: 90vh;
        padding: 1rem;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .hero-container {
        left: 3%;
        top: 45%;
    }
    
    .hero-container h3 {
        font-size: 0.75rem;
        padding: 3px 8px;
    }
    
    .hero-container h3::after {
        width: 20px;
        height: 20px;
    }
    
    .hero img:nth-child(2) {
        width: 80%;
        right: -8rem;
        bottom: -2%;
        opacity: 0.8;
    }
    
    .hero img:last-child {
        height: 120px;
    }
    
    .cta-btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    .server-status {
        bottom: 1rem;
        padding: 0.4rem 1rem;
        font-size: 0.85rem;
    }
    
    .player-count {
        font-size: 0.9rem;
    }

    /* ===== HERO STEPS PREVIEW ===== */
    .hero-steps-preview {
        gap: 0.3rem;
    }
    
    .preview-step {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }
    
    .preview-arrow {
        font-size: 0.9rem;
    }

    /* ===== STATS ===== */
    .stats {
        padding: 30px 0;
    }
    
    .stats .container {
        gap: 20px;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }

    /* ===== PAGE HERO (How to Play) ===== */
    .page-hero {
        min-height: 50vh;
        padding: 1rem;
    }
    
    .page-hero h1 {
        font-size: 2rem;
    }
    
    .page-hero p {
        font-size: 0.95rem;
    }
    
    .hero-icon {
        font-size: 3rem;
    }

    /* ===== STEPS ===== */
    .steps-container {
        padding: 2rem 0;
    }
    
    .step-card {
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 2rem;
    }
    
    .step-number {
        flex-direction: row;
        gap: 1rem;
        align-items: center;
    }
    
    .step-number span {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
    
    .step-line {
        display: none;
    }
    
    .step-content {
        padding: 1.5rem;
    }
    
    .step-header {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .step-header h2 {
        font-size: 1.4rem;
    }
    
    .step-icon {
        font-size: 2rem;
    }

    /* ===== PREREQUISITES ===== */
    .prerequisites-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .prerequisite-card {
        padding: 1rem;
    }

    /* ===== DOWNLOAD CARDS ===== */
    .download-main-card,
    .launcher-card {
        flex-direction: column;
        text-align: center;
        padding: 1.2rem;
    }
    
    .download-card-content,
    .launcher-visual {
        flex-direction: column;
        text-align: center;
    }
    
    .download-icon-large {
        font-size: 2.5rem;
    }
    
    .launcher-logo {
        width: 50px;
        height: 50px;
    }
    
    .launcher-features {
        justify-content: center;
    }

    /* ===== SERVER CONNECT ===== */
    .server-connect-card {
        padding: 1.2rem;
    }
    
    .server-ip-section {
        flex-direction: column;
        text-align: center;
    }
    
    .ip-box {
        justify-content: center;
    }
    
    .ip-text {
        font-size: 1.1rem;
    }
    
    .instruction-list li {
        padding: 0.6rem 2.5rem 0.6rem 0.8rem;
        font-size: 0.85rem;
    }

    /* ===== QUICK NAV ===== */
    .quick-nav {
        display: none;
    }

    /* ===== FOOTER ===== */
    .footer {
        padding: 30px 0 15px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        margin-bottom: 20px;
    }
    
    .footer-links {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .footer-bottom {
        font-size: 0.75rem;
    }

    /* ===== POPUPS ===== */
    .popup-container {
        width: 95%;
        margin: 0.5rem;
        border-radius: 16px;
    }
    
    .popup-header {
        padding: 1.5rem 1.5rem 1rem;
    }
    
    .popup-header h2 {
        font-size: 1.4rem;
    }
    
    .popup-content {
        padding: 1rem 1.5rem;
    }
    
    .support-item {
        flex-direction: column;
        text-align: center;
        padding: 0.8rem;
        gap: 0.5rem;
    }
    
    .support-detail {
        justify-content: center;
    }
    
    .rules-popup-container {
        width: 98% !important;
        max-width: 100% !important;
    }
    
    .rules-compact-header {
        padding: 0.6rem 1rem;
    }
    
    .rules-compact-header h2 {
        font-size: 1rem;
    }
    
    .rules-search-wrapper {
        padding: 0 1rem 0.3rem;
    }
    
    .rule-item {
        padding: 0.5rem 0.6rem;
    }
    
    .rule-title {
        font-size: 0.75rem;
    }

    /* ===== PLAYERS DROPDOWN ===== */
    .players-dropdown-global {
        width: 240px;
        max-height: 300px;
    }
}

/* ============ BREAKPOINT: 480px (Mobile Large) ============ */
@media (max-width: 480px) {
    /* ===== NAV ===== */
    .nav-links {
        width: 85%;
        max-width: 280px;
        padding: 4.5rem 1rem 1.5rem;
    }
    
    .logo span {
        font-size: 1rem;
    }
    
    /* ===== HERO ===== */
    .hero {
        height: 85vh;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 0.9rem;
    }
    
    .hero-container {
        left: 2%;
        top: 40%;
    }
    
    .hero-container h3 {
        font-size: 0.7rem;
        padding: 2px 6px;
    }
    
    .hero img:nth-child(2) {
        width: 90%;
        right: -6rem;
        bottom: 0;
        opacity: 0.6;
    }
    
    .cta-btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .server-status {
        bottom: 0.8rem;
        padding: 0.3rem 0.8rem;
    }
    
    .player-count {
        font-size: 0.8rem;
    }
    
    .status-indicator {
        width: 8px;
        height: 8px;
    }

    /* ===== STATS ===== */
    .stats .container {
        gap: 15px;
    }
    
    .stat-item {
        flex: 1 1 40%;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.7rem;
    }

    /* ===== PAGE HERO ===== */
    .page-hero h1 {
        font-size: 1.6rem;
    }
    
    .hero-steps-preview {
        flex-direction: column;
        gap: 0.3rem;
    }
    
    .preview-arrow {
        display: none;
    }

    /* ===== STEPS ===== */
    .step-content {
        padding: 1rem;
    }
    
    .step-header h2 {
        font-size: 1.2rem;
    }
    
    .prerequisite-card {
        flex-direction: column;
        text-align: center;
    }
    
    .card-arrow {
        display: none;
    }

    /* ===== SERVER IP ===== */
    .ip-box {
        padding: 0.6rem 1rem;
    }
    
    .ip-text {
        font-size: 1rem;
    }
    
    .copy-ip-btn {
        width: 100%;
        justify-content: center;
    }

    /* ===== FOOTER ===== */
    .footer-logo h3 {
        font-size: 1rem;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 0.5rem;
    }

    /* ===== POPUPS ===== */
    .popup-header h2 {
        font-size: 1.2rem;
    }
    
    .popup-icon {
        font-size: 2rem;
    }
    
    .support-icon {
        width: 40px;
        height: 40px;
    }
    
    .rules-category-section .support-item {
        padding: 0.4rem 0.6rem;
    }
}

/* ============ BREAKPOINT: 375px (Mobile Small) ============ */
@media (max-width: 375px) {
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .hero img:nth-child(2) {
        visibility: hidden;
    }
    
    .logo span {
        font-size: 0.9rem;
    }
    
    .logo img {
        width: 30px;
        height: 30px;
    }
    
    .stat-number {
        font-size: 1.3rem;
    }
    
    .step-number span {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

/* ============ SCROLL INDICATOR FIX ============ */
.scroll-indicator {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    z-index: 3; /* بالاتر از محتوای hero */
    pointer-events: none; /* کلیک روش کار کنه */
}

.scroll-indicator span {
    background: rgba(0, 0, 0, 0.6);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.75rem;
}

.scroll-mouse {
    width: 24px;
    height: 38px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    position: relative;
    background: rgba(0, 0, 0, 0.4);
}

.scroll-wheel {
    width: 3px;
    height: 7px;
    background: var(--primary);
    border-radius: 2px;
    position: absolute;
    top: 7px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollWheel 1.5s ease-in-out infinite;
}

@keyframes scrollWheel {
    0% { opacity: 1; top: 7px; }
    50% { opacity: 0.5; }
    100% { opacity: 0; top: 25px; }
}

/* ============ RESPONSIVE FOR SCROLL INDICATOR ============ */
@media (max-width: 768px) {
    .scroll-indicator {
        bottom: 1rem;
        gap: 0.3rem;
    }
    
    .scroll-indicator span {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }
    
    .scroll-mouse {
        width: 20px;
        height: 32px;
        border-radius: 10px;
    }
    
    .scroll-wheel {
        width: 2px;
        height: 5px;
        top: 5px;
    }
}

@media (max-width: 480px) {
    .scroll-indicator {
        bottom: 0.8rem;
    }
    
    .scroll-indicator span {
        font-size: 0.65rem;
        padding: 0.15rem 0.5rem;
    }
    
    .scroll-mouse {
        width: 18px;
        height: 28px;
        border-width: 1.5px;
    }
    
    .scroll-wheel {
        top: 4px;
    }
}