* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #1a1a2e;
    --bg-secondary: #16213e;
    --bg-card: #16213e;
    --bg-sidebar: #0f3460;
    --accent: #f05a28;
    --accent-hover: #d44a1e;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --text-muted: #707070;
    --border: #2a2a4a;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    direction: rtl;
}

body[lang="en"] {
    direction: ltr;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--accent-hover);
}

/* Header */
.header {
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--accent);
    padding: 0.8rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--accent);
}

.logo img {
    height: 36px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav a {
    color: var(--text-primary);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    transition: background 0.3s;
}

.nav a:hover, .nav a.active {
    background: var(--accent);
    color: #fff;
}

.lang-switch {
    display: flex;
    gap: 0.3rem;
    background: var(--bg-primary);
    padding: 0.2rem;
    border-radius: 6px;
}

.lang-switch a {
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.lang-switch a.active {
    background: var(--accent);
    color: #fff;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
    border-bottom: 1px solid var(--border);
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
    color: var(--accent);
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Game Cards */
.cards-section {
    padding: 3rem 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.cards-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.6rem;
}

.game-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.game-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s, border-color 0.3s;
    cursor: pointer;
    display: block;
}

.game-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
}

.game-card .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.game-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.game-card .badge {
    display: inline-block;
    background: var(--success);
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    border-top: 2px solid var(--accent);
    padding: 1.5rem 2rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer a {
    color: var(--accent);
    margin: 0 0.5rem;
}

.footer .discord-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #5865F2;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    margin-top: 0.5rem;
    transition: background 0.3s;
}

.footer .discord-link:hover {
    background: #4752c4;
}

/* Layout for guide pages */
.page-layout {
    display: flex;
    min-height: calc(100vh - 120px);
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--bg-sidebar);
    padding: 1.5rem;
    flex-shrink: 0;
    overflow-y: auto;
    max-height: calc(100vh - 60px);
    position: sticky;
    top: 60px;
    border-left: 1px solid var(--border);
}

.sidebar h3 {
    font-size: 1rem;
    color: var(--accent);
    margin: 1rem 0 0.5rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid var(--border);
}

.sidebar h3:first-child {
    margin-top: 0;
}

.sidebar ul {
    list-style: none;
}

.sidebar ul li a {
    display: block;
    padding: 0.4rem 0.7rem;
    color: var(--text-secondary);
    border-radius: 6px;
    font-size: 0.9rem;
    transition: background 0.2s, color 0.2s;
}

.sidebar ul li a:hover,
.sidebar ul li a.active {
    background: var(--accent);
    color: #fff;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.3rem;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem 3rem;
    max-width: 900px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--text-secondary);
}

.breadcrumb .separator {
    color: var(--text-muted);
}

.main-content h1 {
    font-size: 1.8rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent);
}

.guide-content h2 {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin: 1.8rem 0 0.8rem;
}

.guide-content h3 {
    font-size: 1.1rem;
    color: var(--accent);
    margin: 1.2rem 0 0.5rem;
}

.guide-content p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.guide-content ul, .guide-content ol {
    margin: 0.8rem 0 1rem 1.5rem;
    color: var(--text-secondary);
}

.guide-content li {
    margin-bottom: 0.4rem;
}

/* Steps */
.steps {
    list-style: none;
    counter-reset: step;
    margin: 1rem 0;
}

.steps li {
    counter-increment: step;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-right: 4px solid var(--accent);
    padding: 1rem 1.2rem;
    margin-bottom: 0.8rem;
    border-radius: 8px;
    position: relative;
    padding-right: 3.5rem;
}

.steps li::before {
    content: counter(step);
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--accent);
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.85rem;
}

.steps li strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.3rem;
}

.steps li p, steps li span {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Info Boxes */
.info-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-right: 4px solid var(--info);
    padding: 1rem 1.2rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.info-box.warning {
    border-right-color: var(--warning);
}

.info-box.danger {
    border-right-color: var(--danger);
}

.info-box.success {
    border-right-color: var(--success);
}

.info-box strong {
    display: block;
    margin-bottom: 0.3rem;
    color: var(--text-primary);
}

.info-box p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* FAQ */
.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem 1.2rem;
    margin-bottom: 0.8rem;
}

.faq-item strong {
    color: var(--accent);
    display: block;
    margin-bottom: 0.3rem;
}

.faq-item p {
    margin: 0;
    color: var(--text-secondary);
}

/* Table */
.guide-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
}

.guide-content table th,
.guide-content table td {
    padding: 0.7rem 1rem;
    border: 1px solid var(--border);
    text-align: right;
}

.guide-content table th {
    background: var(--bg-sidebar);
    color: var(--accent);
    font-weight: 600;
}

.guide-content table td {
    color: var(--text-secondary);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.6rem 1.4rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background 0.3s;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-hover);
    color: #fff;
}

.btn-outline {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
}

.btn-outline:hover {
    background: var(--accent);
    color: #fff;
}

/* Feedback Section */
.feedback-section {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    text-align: center;
}

.feedback-section p {
    margin-bottom: 0.8rem;
    color: var(--text-secondary);
}

.feedback-btns {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
}

.feedback-btns button {
    padding: 0.5rem 1.2rem;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: border-color 0.3s, background 0.3s;
}

.feedback-btns button:hover {
    border-color: var(--accent);
    background: var(--bg-sidebar);
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    background: var(--accent);
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        padding: 0.6rem 1rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .nav {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 0.5rem;
        padding-top: 0.5rem;
    }

    .nav.open {
        display: flex;
    }

    .hamburger {
        display: block;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .sidebar {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        width: 260px;
        height: 100vh;
        z-index: 1001;
        border-left: 2px solid var(--accent);
        max-height: 100vh;
    }

    .sidebar.open {
        display: block;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 1000;
    }

    .sidebar-overlay.open {
        display: block;
    }

    .main-content {
        padding: 1.5rem 1rem;
    }

    .steps li {
        padding-right: 1rem;
    }

    .steps li::before {
        right: auto;
        left: 1rem;
        top: 0.5rem;
        transform: none;
    }

    .steps li {
        padding-left: 3rem;
        padding-top: 0.8rem;
    }

    .game-cards {
        grid-template-columns: 1fr;
    }
}

/* Utility */
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
