/* ============ COLOR VARIABLES ============ */
:root {
    --primary: #8B2252;
    --primary-dark: #6B1A3F;
    --primary-darker: #4A0E2A;
    --primary-light: #A83262;
    --primary-glow: rgba(139, 34, 82, 0.3);
    --primary-glow-strong: rgba(139, 34, 82, 0.6);
    --primary-bg: rgba(139, 34, 82, 0.05);
    --primary-bg-hover: rgba(139, 34, 82, 0.1);
    --primary-border: rgba(139, 34, 82, 0.2);
    --primary-border-hover: rgba(139, 34, 82, 0.4);
    --gold: rgba(212, 175, 55, 1);
    --gold-bg: rgba(212, 175, 55, 0.05);
    --gold-border: rgba(212, 175, 55, 0.2);
    --bg-dark: #0a0a0a;
    --bg-card: #151515;
    --bg-card-hover: #1a1a1a;
    --text: #ffffff;
    --text-light: #cccccc;
    --text-muted: #888888;
    --success: #00ff00;
    --success-glow: rgba(0, 255, 0, 0.3);
    --danger: #ff0000;
    --danger-glow: rgba(255, 0, 0, 0.3);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Tahoma', 'Segoe UI', sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    direction: rtl;
    line-height: 1.6;
}

button {
    transition: all 0.3s, scale 0.5s cubic-bezier(0.3, 0, 0, 1) !important;
    scale: 1;
}

button:hover {
    scale: 1.1;
}

/* Header & Navigation */
header {
    background-color: transparent;
    border-bottom: 2px solid transparent;
    padding: 1rem 2rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: 0.4s cubic-bezier(0.5, 0, 0, 0.5);
}

header.scrolled {
    background-color: var(--bg-card);
    border-bottom-color: var(--primary-darker);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #333;
}

.logo span {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    position: relative;
    color: var(--text);
    text-decoration: none;
    transition: color 0.3s;
    padding: 0.5rem 0;
}

.nav-links a::after {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    content: "";
    width: 100%;
    height: 1px;
    background-color: var(--text);
    transition: 0.3s;
}

.nav-links a:hover::after {
    transform: translateX(-50%) scaleX(1);
}

.nav-links a:hover {
    color: var(--primary);
}

.connect-btn {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
}

.connect-btn::after {
    content: " ✓";
    direction: ltr;
}

.connect-btn:hover {
    background-color: var(--primary-dark);
}

/* Hero Section */
.hero {
    position: relative;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../imgs/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    overflow: hidden;
}

.hero-content {
    z-index: 2;
}

.hero-container {
    top: 50%;
    transform: translateY(-50%);
    left: 10%;
    position: absolute;
}

.hero-container h3 {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(139, 34, 82, 0.1);
    border: 1px solid var(--gold);
    filter: drop-shadow(0 0 50px rgba(212, 175, 55, 0.5));
    padding: 5px 10px;
    backdrop-filter: blur(10px);
    border-radius: 100vw;
}

.hero-container h3::after {
    content: "";
    width: 30px;
    height: 30px;
    margin-right: 10px;
    background-image: url(../imgs/first.webp);
    background-size: cover;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--primary);
    text-shadow: 0 0 30px var(--primary-glow);
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
}

.hero img:nth-child(2) {
    position: absolute;
    width: 70%;
    right: -10rem;
    bottom: -5%;
}

.hero img:last-child {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 200px;
}

.cta-btn {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 5px;
    font-size: 1.2rem;
    cursor: pointer;
}

.cta-btn:hover {
    background-color: var(--primary-dark);
}

/* Server Status */
.server-status {
    position: absolute;
    z-index: 2;
    bottom: 2rem;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 0.5rem 1.2rem;
    border-radius: 25px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.status-indicator.online {
    background-color: var(--success);
    box-shadow: 0 0 10px var(--success);
}

.status-indicator.offline {
    background-color: var(--danger);
    box-shadow: 0 0 10px var(--danger);
}

.player-count {
    font-size: 1.1rem;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    transition: color 0.2s;
}

.player-count:hover {
    color: var(--primary);
}

.player-count::after {
    content: " ▼";
    font-size: 0.7rem;
    opacity: 0.7;
}

/* Stats */
.stats {
    background: var(--bg-card);
    padding: 50px 0;
}

.stats .container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    display: block;
    color: var(--primary);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Footer */
.footer {
    background: var(--bg-dark);
    padding: 50px 0 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.footer-logo h3 {
    color: var(--primary);
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #1a1a1a;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ============ PLAYERS DROPDOWN GLOBAL ============ */
.players-dropdown-global {
    position: fixed;
    width: 260px;
    max-height: 350px;
    background: rgba(20, 20, 20, 0.97);
    backdrop-filter: blur(20px);
    border: 1px solid var(--primary-border-hover);
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7), 0 0 20px var(--primary-glow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.3, 0, 0, 1);
    z-index: 9999;
    overflow: hidden;
}

.players-dropdown-global.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    color: #ccc;
    background: var(--primary-bg);
}

.dropdown-close {
    cursor: pointer;
    font-size: 0.9rem;
    color: #888;
    transition: color 0.2s;
    padding: 5px;
}

.dropdown-close:hover {
    color: var(--primary);
}

.players-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 280px;
    overflow-y: auto;
    direction: ltr;
}

.players-list li {
    direction: rtl;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1rem;
    color: #ccc;
    font-size: 0.85rem;
    transition: all 0.2s;
    border-right: 2px solid transparent;
}

.players-list li:hover {
    background: var(--primary-bg-hover);
    border-right-color: var(--primary);
    color: #fff;
}

.players-list li:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.player-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 150px;
}

.player-ping {
    color: var(--success);
    font-size: 0.8rem;
    direction: ltr;
    flex-shrink: 0;
}

.player-ping.high {
    color: #ffaa00;
}

.players-list::-webkit-scrollbar {
    width: 4px;
}

.players-list::-webkit-scrollbar-track {
    background: transparent;
}

.players-list::-webkit-scrollbar-thumb {
    background: var(--primary-border);
    border-radius: 10px;
}

/* ============ POPUP STYLES ============ */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.popup-container {
    background: linear-gradient(135deg, #1a1a1a 0%, #151515 100%);
    border: 1px solid var(--primary-border-hover);
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8), 0 0 30px var(--primary-glow);
    animation: popupSlideIn 0.4s cubic-bezier(0.3, 0, 0, 1);
    transform: translateY(30px);
    transition: transform 0.3s ease;
}

.popup-container::before {
    position: absolute;
    content: "";
    inset: 0;
    background-image: url(../imgs/model-1.png);
    background-size: cover;
    background-position: -10%;
    z-index: -1;
    opacity: 0.05;
}

.popup-overlay.active .popup-container {
    transform: translateY(0);
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary-bg-hover);
    border: 1px solid var(--primary-border);
    color: var(--primary);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 1;
}

.popup-close:hover {
    background: var(--primary);
    color: white;
    transform: rotate(90deg);
}

.popup-header {
    text-align: center;
    padding: 2rem 2rem 1.5rem;
    border-bottom: 1px solid var(--primary-border);
}

.popup-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 20px var(--primary-glow-strong));
}

.popup-header h2 {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.popup-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.popup-content {
    padding: 1.5rem 2rem;
}

.support-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.support-item:hover {
    background: var(--primary-bg);
    border-color: var(--primary-border);
}

.ts-item {
    background: var(--primary-bg);
    border-color: var(--primary-border);
    position: relative;
}

.ts-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, var(--primary-bg), transparent);
    border-radius: 12px;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.5;
    }
}

.disabled-item {
    opacity: 0.5;
    cursor: not-allowed;
}

.disabled-item:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.05);
}

.support-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.support-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.support-info {
    flex: 1;
}

.support-info h3 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.support-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.support-detail {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.copy-badge {
    background: var(--primary-bg-hover);
    color: var(--primary);
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    border: 1px solid var(--primary-border);
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.7;
    }

    50% {
        opacity: 1;
    }
}

.ip-address {
    color: #fff;
    font-weight: bold;
    font-size: 0.9rem;
    direction: ltr;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.3rem 0.8rem;
    border-radius: 5px;
}

.coming-soon {
    background: rgba(255, 255, 255, 0.05);
    color: #666;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.separator {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: #666;
    font-size: 0.85rem;
}

.separator::before,
.separator::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.popup-footer {
    text-align: center;
    padding: 1rem 2rem;
    border-top: 1px solid var(--primary-border);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.popup-footer p {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.ts-item.copied {
    background: rgba(0, 255, 0, 0.1) !important;
    border-color: rgba(0, 255, 0, 0.3) !important;
}

.ts-item.copied .copy-badge {
    background: rgba(0, 255, 0, 0.2);
    color: #00ff00;
    border-color: rgba(0, 255, 0, 0.3);
}

.popup-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--primary);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: bold;
    z-index: 10001;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px var(--primary-glow-strong);
    direction: rtl;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.popup-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ============ TOAST (for server IP copy) ============ */
.toast-notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--success);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: bold;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px var(--success-glow);
    direction: rtl;
}

.toast-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-container {
        left: 5%;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .popup-container {
        width: 95%;
        margin: 1rem;
    }

    .popup-header h2 {
        font-size: 1.5rem;
    }

    .support-item {
        flex-direction: column;
        text-align: center;
    }

    .support-detail {
        justify-content: center;
    }
}

@media (max-width: 425px) {
    .hero img:nth-child(2) {
        visibility: hidden;
    }
}

/* ============ RULES POPUP ============ */

.rules-overlay {
    z-index: 20002;
}

.rules-container {
    width: 95%;
    max-width: 800px;
    max-height: 85vh;
}

.rules-header {
    text-align: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--primary-border);
    background: linear-gradient(180deg, var(--primary-bg), transparent);
}

.rules-header-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 0 15px var(--primary-glow));
}

.rules-header h2 {
    font-size: 1.6rem;
    color: var(--primary);
    margin-bottom: 0.3rem;
}

.rules-header p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ============ TABS ============ */
.rules-tabs {
    display: flex;
    gap: 0.3rem;
    padding: 0.8rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    overflow-x: auto;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.rules-tabs::-webkit-scrollbar {
    height: 3px;
}

.rules-tabs::-webkit-scrollbar-thumb {
    background: var(--primary-border);
    border-radius: 5px;
}

.rules-tab {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s;
    font-family: inherit;
}

.rules-tab:hover {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
}

.rules-tab.active {
    color: var(--primary);
    border-color: var(--primary-border);
    background: var(--primary-bg);
}

.tab-count {
    font-size: 0.7rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.1rem 0.5rem;
    border-radius: 10px;
    color: var(--text-muted);
}

.rules-tab.active .tab-count {
    background: var(--primary-bg-hover);
    color: var(--primary);
}

/* ============ CONTENT ============ */
.rules-content {
    padding: 0;
    max-height: 50vh;
    overflow-y: auto;
}

.rules-content::-webkit-scrollbar {
    width: 5px;
}

.rules-content::-webkit-scrollbar-thumb {
    background: var(--primary-border);
    border-radius: 5px;
}

.rules-category {
    display: none;
}

.rules-category.active {
    display: block;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    font-weight: bold;
    color: var(--primary);
    font-size: 1.1rem;
    background: var(--primary-bg);
    border-bottom: 1px solid var(--primary-border);
    position: sticky;
    top: 0;
    z-index: 1;
}

.category-icon {
    font-size: 1.3rem;
}

/* ============ RULE ITEMS ============ */
.rules-list {
    padding: 1rem 1.5rem;
}

.rule-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.2rem;
    margin-bottom: 0.8rem;
    transition: all 0.3s;
    border-right: 3px solid transparent;
}

.rule-item:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
    border-right-color: var(--primary);
}

.rule-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
    flex-wrap: wrap;
}

.rule-number {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: bold;
}

.rule-title {
    font-size: 1rem;
    color: var(--text);
    flex: 1;
}

.severity-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 15px;
    font-size: 0.7rem;
    border: 1px solid;
    opacity: 0.8;
}

.severity-low {
    background: rgba(0, 255, 0, 0.05);
    color: #00ff00;
}

.severity-medium {
    background: rgba(255, 170, 0, 0.05);
    color: #ffaa00;
}

.severity-high {
    background: rgba(255, 68, 68, 0.05);
    color: #ff4444;
}

.rule-description {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 0.8rem;
}

.rule-penalty {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.penalty-icon {
    font-size: 0.9rem;
}

.penalty-label {
    color: var(--primary);
    font-weight: bold;
    font-size: 0.85rem;
}

.penalty-text {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.rules-footer {
    text-align: center;
    padding: 1rem;
    border-top: 1px solid var(--primary-border);
    color: var(--text-muted);
    font-size: 0.85rem;
    background: rgba(0, 0, 0, 0.2);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    .rules-container {
        width: 98%;
        max-height: 90vh;
    }

    .rules-tabs {
        gap: 0.2rem;
        padding: 0.5rem;
    }

    .rules-tab {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
        gap: 0.2rem;
    }

    .rule-item {
        padding: 1rem;
    }

    .rule-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }
}

/* ============ RULES IN POPUP ============ */
.rules-category-section {
    margin-bottom: 0.5rem;
}

.rules-category-section .support-item {
    justify-content: space-between;
}

.rules-toggle-arrow {
    color: var(--primary);
    font-size: 0.8rem;
    transition: transform 0.3s;
    flex-shrink: 0;
}

.rules-expandable {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0 0 12px 12px;
    padding: 0.5rem;
    margin-top: -0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.03);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }

    to {
        opacity: 1;
        max-height: 500px;
    }
}

.rule-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-right: 3px solid var(--primary);
    border-radius: 8px;
    padding: 0.8rem 1rem;
    margin-bottom: 0.4rem;
    transition: all 0.2s;
}

.rule-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.rule-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.4rem;
    flex-wrap: wrap;
}

.rule-number {
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: bold;
    flex-shrink: 0;
}

.rule-title {
    font-size: 0.9rem;
    color: var(--text);
    flex: 1;
    min-width: 120px;
}

.severity-badge {
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-size: 0.65rem;
    border: 1px solid;
    flex-shrink: 0;
}

.severity-low {
    background: rgba(0, 255, 0, 0.05);
    color: #00ff00;
    border-color: rgba(0, 255, 0, 0.3);
}

.severity-medium {
    background: rgba(255, 170, 0, 0.05);
    color: #ffaa00;
    border-color: rgba(255, 170, 0, 0.3);
}

.severity-high {
    background: rgba(255, 68, 68, 0.05);
    color: #ff4444;
    border-color: rgba(255, 68, 68, 0.3);
}

.rule-description {
    color: var(--text-light);
    font-size: 0.8rem;
    line-height: 1.5;
    margin-bottom: 0.4rem;
    padding-right: 1.5rem;
}

.rule-penalty {
    color: var(--text-muted);
    font-size: 0.75rem;
    padding-right: 1.5rem;
}

.rule-penalty span {
    color: var(--primary);
}

/* Rules popup scrollbar */
.popup-content::-webkit-scrollbar {
    width: 4px;
}

.popup-content::-webkit-scrollbar-thumb {
    background: var(--primary-border);
    border-radius: 5px;
}

/* ============ RULES POPUP ============ */
.rules-popup-container {
    max-width: 500px !important;
}

/* Search Box */
.rules-search-wrapper {
    padding: 0 1.5rem 0.5rem;
}

.rules-search-box {
    position: relative;
}

.rules-search-input {
    width: 100%;
    padding: 0.7rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text);
    font-size: 0.85rem;
    font-family: inherit;
    transition: all 0.3s;
    outline: none;
}

.rules-search-input:focus {
    border-color: var(--primary-border);
    box-shadow: 0 0 15px var(--primary-glow);
    background: rgba(255, 255, 255, 0.08);
}

.rules-search-input::placeholder {
    color: var(--text-muted);
}

/* Autocomplete */
.rules-search-autocomplete {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1a1a1a;
    border: 1px solid var(--primary-border);
    border-radius: 0 0 10px 10px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 10;
    display: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.rules-search-autocomplete::-webkit-scrollbar {
    width: 3px;
}

.rules-search-autocomplete::-webkit-scrollbar-thumb {
    background: var(--primary-border);
    border-radius: 5px;
}

.autocomplete-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    cursor: pointer;
    color: var(--text-light);
    font-size: 0.8rem;
    transition: all 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.autocomplete-item:hover {
    background: var(--primary-bg);
    color: var(--text);
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.autocomplete-category {
    color: var(--primary);
    font-size: 0.7rem;
    margin-right: auto;
    opacity: 0.7;
}

.autocomplete-no-result,
.autocomplete-count,
.autocomplete-more {
    padding: 0.8rem 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.autocomplete-count {
    color: var(--primary);
    font-weight: bold;
}

/* Rules Category Sections */
.rules-category-section {
    margin-bottom: 0.3rem;
}

.rules-category-section .support-item {
    justify-content: space-between;
    padding: 0.6rem 1rem;
    gap: 0.6rem;
}

.rules-category-section .support-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.rules-category-section .support-info h3 {
    font-size: 0.9rem;
}

.rules-toggle-arrow {
    color: var(--primary);
    font-size: 0.7rem;
    transition: transform 0.3s;
    flex-shrink: 0;
    cursor: pointer;
    padding: 5px;
}

.rules-expandable {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 0 0 10px 10px;
    padding: 0.4rem;
    margin-top: -0.3rem;
    border: 1px solid rgba(255, 255, 255, 0.03);
    animation: slideDown 0.3s ease;
    max-height: 300px;
    overflow-y: auto;
}

.rules-expandable::-webkit-scrollbar {
    width: 3px;
}

.rules-expandable::-webkit-scrollbar-thumb {
    background: var(--primary-border);
    border-radius: 5px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }

    to {
        opacity: 1;
        max-height: 300px;
    }
}

/* Rule Items */
.rule-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-right: 3px solid var(--primary);
    border-radius: 6px;
    padding: 0.6rem 0.8rem;
    margin-bottom: 0.3rem;
    transition: all 0.2s;
}

.rule-item:last-child {
    margin-bottom: 0;
}

.rule-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.rule-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
    flex-wrap: wrap;
}

.rule-number {
    color: var(--primary);
    font-size: 0.7rem;
    font-weight: bold;
    flex-shrink: 0;
    min-width: 25px;
}

.rule-title {
    font-size: 0.82rem;
    color: var(--text);
    flex: 1;
    min-width: 100px;
}

.severity-badge {
    padding: 0.1rem 0.4rem;
    border-radius: 10px;
    font-size: 0.6rem;
    border: 1px solid;
    flex-shrink: 0;
}

.severity-low {
    background: rgba(0, 255, 0, 0.05);
    color: #00ff00;
    border-color: rgba(0, 255, 0, 0.3);
}

.severity-medium {
    background: rgba(255, 170, 0, 0.05);
    color: #ffaa00;
    border-color: rgba(255, 170, 0, 0.3);
}

.severity-high {
    background: rgba(255, 68, 68, 0.05);
    color: #ff4444;
    border-color: rgba(255, 68, 68, 0.3);
}

.rule-description {
    color: var(--text-light);
    font-size: 0.75rem;
    line-height: 1.5;
    margin-bottom: 0.3rem;
    padding-right: 1.2rem;
}

.rule-penalty {
    color: var(--text-muted);
    font-size: 0.7rem;
    padding-right: 1.2rem;
}

.rule-penalty span {
    color: var(--primary);
}

/* Popup scrollbar */
.popup-content::-webkit-scrollbar {
    width: 3px;
}

.popup-content::-webkit-scrollbar-thumb {
    background: var(--primary-border);
    border-radius: 5px;
}

/* ============ COMPACT RULES HEADER ============ */
.rules-compact-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1.5rem;
    background: rgba(139, 34, 82, 0.05);
    border-bottom: 1px solid var(--primary-border);
}

.rules-compact-header .rules-header-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 0 10px var(--primary-glow));
    flex-shrink: 0;
}

.rules-compact-header h2 {
    font-size: 1.1rem;
    color: var(--primary);
    font-weight: bold;
    margin: 0;
    text-shadow: 0 0 15px var(--primary-glow);
}

/* ============ HAMBURGER MENU ============ */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 5px;
    transition: all 0.3s;
}

.hamburger-btn span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--text);
    border-radius: 3px;
    transition: all 0.3s cubic-bezier(0.3, 0, 0, 1);
    transform-origin: center;
}

/* انیمیشن تبدیل به X */
.hamburger-btn.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger-btn.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger-btn.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    /* نمایش دکمه همبرگری */
    .hamburger-btn {
        display: flex;
        position: absolute;
        right: 1rem;
        top: 50%;
        transform: translateY(-50%);
    }
    
    /* تنظیمات nav */
    nav {
        position: relative;
        flex-direction: row;
        justify-content: space-between;
        padding: 0.5rem 0;
    }
    
    .logo {
        z-index: 1001;
    }
    
    .logo span {
        font-size: 1.2rem;
    }
    
    .logo img {
        width: 35px;
        height: 35px;
    }
    
    /* مخفی کردن منو پیش‌فرض */
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: rgba(15, 15, 15, 0.98);
        backdrop-filter: blur(15px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 1.5rem;
        padding: 2rem;
        z-index: 1000;
        transition: right 0.4s cubic-bezier(0.3, 0, 0, 1);
        border-left: 1px solid var(--primary-border);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    }
    
    /* نمایش منو */
    .nav-links.active {
        right: 0;
    }
    
    .nav-links a {
        font-size: 1.1rem;
        padding: 0.8rem 0;
        width: 100%;
        text-align: center;
    }
    
    /* دکمه اتصال */
    .connect-btn {
        display: none; /* مخفی توی موبایل، یا می‌تونی بذاری تو منو */
    }
    
    /* یا اگه می‌خوای توی منو باشه: */
    .nav-links .connect-btn-mobile {
        display: block;
        margin-top: 1rem;
    }
    
    /* Overlay برای بستن منو */
    body.menu-open::before {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        transition: opacity 0.3s;
    }
    
    /* Hero */
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-container {
        left: 5%;
    }
    
    .hero img:nth-child(2) {
        width: 90%;
        right: -5rem;
    }
    
    .hero-steps-preview {
        gap: 0.4rem;
    }
    
    .preview-step {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }
    
    /* Footer */
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
    
    /* Popup */
    .popup-container {
        width: 95%;
        margin: 1rem;
    }

    .popup-header h2 {
        font-size: 1.5rem;
    }

    .support-item {
        flex-direction: column;
        text-align: center;
    }

    .support-detail {
        justify-content: center;
    }
}

@media (max-width: 425px) {
    .hero img:nth-child(2) {
        visibility: hidden;
    }
    
    .hero h1 {
        font-size: 1.6rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .hero-container {
        left: 2%;
    }
    
    .nav-links {
        width: 100%;
        max-width: 100%;
    }
}

.mobile-only {
    display: none;
}

@media (max-width: 768px) {
    .mobile-only {
        display: block;
    }
    
    .connect-btn {
        display: none;
    }
}

/* ============ HAMBURGER MENU ============ */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 5px;
    transition: all 0.3s;
    order: -1;
}

.hamburger-btn span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--text);
    border-radius: 3px;
    transition: all 0.3s cubic-bezier(0.3, 0, 0, 1);
    transform-origin: center;
}

.hamburger-btn.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger-btn.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger-btn.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Overlay */
body.menu-open::after {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    .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.2rem;
    }
    
    .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; /* padding بالا برای رد شدن از هدر */
        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.active li:nth-child(7) { transition-delay: 0.4s; }
    
    .nav-links a {
        display: block;
        font-size: 1rem;
        padding: 0.9rem 1rem;
        width: 100%;
        text-align: right;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        color: var(--text-light);
        transition: all 0.2s;
    }
    
    .nav-links a:hover {
        color: var(--primary);
        background: var(--primary-bg);
        padding-right: 1.5rem;
    }
    
    .nav-links a::after {
        display: none;
    }
    
    .nav-links li:last-child a {
        border-bottom: none;
    }
    
    /* دکمه اتصال */
    .connect-btn {
        display: none;
    }
    
    .mobile-only {
        display: block;
        margin-top: 0.5rem;
        padding: 0.5rem 1rem;
    }
    
    .mobile-only .connect-btn {
        display: block;
        width: 100%;
        text-align: center;
        padding: 0.8rem;
        margin-top: 0.5rem;
        border-radius: 8px;
    }
    
    /* Hero */
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-container {
        left: 5%;
    }
    
    .hero img:nth-child(2) {
        width: 90%;
        right: -5rem;
    }
    
    /* Footer */
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
    
    /* Popup */
    .popup-container {
        width: 95%;
        margin: 1rem;
    }
    
    .popup-header h2 {
        font-size: 1.5rem;
    }
    
    .support-item {
        flex-direction: column;
        text-align: center;
    }
    
    .support-detail {
        justify-content: center;
    }
    
    .rules-popup-container {
        width: 98% !important;
    }
    
    .quick-nav {
        display: none;
    }
}

@media (max-width: 425px) {
    .nav-links {
        width: 85%;
        max-width: 280px;
        padding: 4.5rem 1rem 1.5rem;
    }
    
    .hero img:nth-child(2) {
        visibility: hidden;
    }
    
    .hero h1 {
        font-size: 1.6rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .hero-container {
        left: 2%;
    }
    
    .logo span {
        font-size: 1rem;
    }
}

/* Feature Cards (اگه داری) */
.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 0 100px rgba(139, 34, 82, 0.2);
}

/* Buttons */
.connect-btn:hover {
    background-color: var(--primary-dark);
    box-shadow: 0 0 60px rgba(139, 34, 82, 0.3);
}

.cta-btn:hover {
    background-color: var(--primary-dark);
    box-shadow: 0 0 80px rgba(139, 34, 82, 0.3);
}

/* Stat Items */
.stat-item:hover .stat-number {
    text-shadow: 0 0 30px rgba(139, 34, 82, 0.6);
}

/* Player Count */
.player-count:hover {
    color: var(--primary);
    text-shadow: 0 0 20px rgba(139, 34, 82, 0.4);
}

/* Popup */
.popup-container:hover {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8), 
                0 0 100px rgba(139, 34, 82, 0.15);
}

/* Support Items */
.support-item:hover {
    background: var(--primary-bg);
    border-color: var(--primary-border);
    box-shadow: 0 0 60px rgba(139, 34, 82, 0.1);
}

/* Copy Badge */
.copy-badge {
    box-shadow: 0 0 20px rgba(139, 34, 82, 0.2);
}

/* Dropdown */
.players-dropdown-global {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7), 
                0 0 30px rgba(139, 34, 82, 0.3);
}

/* Players List Items */
.players-list li:hover {
    background: var(--primary-bg-hover);
    border-right-color: var(--primary);
    color: #fff;
    box-shadow: 0 0 40px rgba(139, 34, 82, 0.1);
}

/* ============ AUTH BUTTONS ============ */
.auth-buttons {
    display: flex;
    gap: 0.5rem;
}

.login-btn {
    background: transparent !important;
    border: 1px solid var(--primary) !important;
    color: var(--primary) !important;
}

.login-btn:hover {
    background: var(--primary-bg) !important;
    color: var(--primary) !important;
}

.register-btn {
    background: var(--primary) !important;
}

.logout-btn {
    background: transparent !important;
    border: 1px solid #ff4444 !important;
    color: #ff4444 !important;
}

.logout-btn:hover {
    background: rgba(255, 68, 68, 0.1) !important;
}

.dashboard-link {
    color: var(--primary) !important;
    font-weight: bold;
    border: 1px solid var(--primary);
    padding: 0.4rem 1rem !important;
    border-radius: 5px;
    transition: all 0.3s;
}

.dashboard-link:hover {
    background: var(--primary-bg) !important;
    box-shadow: 0 0 15px var(--primary-glow);
}

.support-item.discord-item {
    cursor: pointer;
    opacity: 1;
}

.support-item.discord-item:hover {
    background: var(--primary-bg);
    border-color: var(--primary-border);
    box-shadow: 0 0 60px rgba(139, 34, 82, 0.15);
    transform: translateY(-2px);
}

.support-item.discord-item .copy-badge {
    box-shadow: 0 0 20px rgba(139, 34, 82, 0.25);
}


/* ============ NARCO POPUP SCROLLBAR FIX ============ */

.popup-container {
    scrollbar-width: thin;
    scrollbar-color: rgba(168, 50, 98, 0.8) rgba(255, 255, 255, 0.04);
}

/* Chrome / Edge / Safari */
.popup-container::-webkit-scrollbar {
    width: 8px;
}

.popup-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 999px;
    margin: 18px 0;
}

.popup-container::-webkit-scrollbar-thumb {
    background: linear-gradient(
        180deg,
        var(--primary-light),
        var(--primary-dark)
    );
    border-radius: 999px;
    border: 2px solid rgba(10, 10, 10, 0.9);
    box-shadow: 0 0 15px var(--primary-glow-strong);
}

.popup-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(
        180deg,
        #d83d86,
        var(--primary)
    );
    box-shadow: 0 0 25px var(--primary-glow-strong);
}

/* Also style popup content scrollbars if any inner content scrolls */
.popup-content {
    scrollbar-width: thin;
    scrollbar-color: rgba(168, 50, 98, 0.8) rgba(255, 255, 255, 0.04);
}

.popup-content::-webkit-scrollbar {
    width: 6px;
}

.popup-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 999px;
}

.popup-content::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 999px;
    box-shadow: 0 0 12px var(--primary-glow);
}