:root {
    --main-color: #E5BD63;
    --main-bg: #1a1a1a;
    --lighter-bg: #242424;
    --darker-main: #D4A843;
    --text-light: #ffffff;
    --text-gray: #c5c5c5;
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Oswald', sans-serif;
    background: linear-gradient(135deg, #0d0d0d 0%, var(--main-bg) 50%, var(--lighter-bg) 100%);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--main-bg);
    border-left: 1px solid var(--lighter-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--main-color);
    border-radius: 6px;
    border: 2px solid var(--main-bg);
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--darker-main);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header {
    background-color: var(--lighter-bg);
    padding: 1.2rem 0;
    position: sticky;
    top: 0;
    z-index: 1001;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 0.75rem;
}

.logo {
    height: 70px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--main-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.logo-link:hover .logo-text {
    color: var(--darker-main);
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background-color: var(--main-color);
    color: #0a0a0a;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
    border: 2px solid var(--main-color);
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(229, 189, 99, 0.15);
}

.back-btn:hover {
    background-color: var(--darker-main);
    border-color: var(--darker-main);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(229, 189, 99, 0.25);
}

.rules-main {
    padding: 4rem 0 2rem 0;
    min-height: calc(100vh - 200px);
}

.rules-header {
    text-align: center;
    margin-bottom: 4rem;
}

.rules-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--main-color);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

.rules-subtitle {
    font-size: 1.2rem;
    color: var(--text-gray);
    font-weight: 300;
    margin-bottom: 2rem;
}

/* Layout */
.rules-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    align-items: start;
    margin-top: 2rem;
}

/* Sidebar */
.rules-sidebar {
    position: sticky;
    top: 100px;
    background-color: var(--lighter-bg);
    border: 1px solid rgba(229, 189, 99, 0.2);
    border-radius: 8px;
    padding: 1.5rem;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.rules-sidebar::-webkit-scrollbar {
    width: 6px;
}

.rules-sidebar::-webkit-scrollbar-thumb {
    background: var(--main-color);
    border-radius: 3px;
}

.sidebar-title {
    color: var(--main-color);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(229, 189, 99, 0.3);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sidebar-link {
    color: var(--text-gray);
    text-decoration: none;
    padding: 0.6rem 0.8rem;
    border-radius: 5px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.sidebar-link:hover {
    background-color: rgba(229, 189, 99, 0.08);
    color: var(--main-color);
    border-left-color: var(--main-color);
    padding-left: 1rem;
}

.sidebar-link.active {
    background-color: rgba(229, 189, 99, 0.15);
    color: var(--main-color);
    border-left-color: var(--main-color);
    font-weight: 600;
}

.rules-content {
    max-width: 900px;
    margin: 0 auto;
}

.rule-section {
    background-color: var(--lighter-bg);
    border: 1px solid rgba(229, 189, 99, 0.15);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.rule-section:hover {
    border-color: rgba(229, 189, 99, 0.3);
    box-shadow: 0 4px 16px rgba(229, 189, 99, 0.1);
}

.rule-section.final-note {
    background: linear-gradient(135deg, var(--lighter-bg) 0%, rgba(229, 189, 99, 0.05) 100%);
    border-color: rgba(229, 189, 99, 0.3);
}

.section-number {
    display: inline-block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--main-color);
    margin-right: 1rem;
    vertical-align: middle;
}

.section-title {
    display: inline-block;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--main-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    vertical-align: middle;
}

.rule-item {
    background-color: var(--main-bg);
    border: 1px solid rgba(229, 189, 99, 0.1);
    border-radius: 6px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.rule-item:last-child {
    margin-bottom: 0;
}

.rule-item:hover {
    border-color: rgba(229, 189, 99, 0.25);
    background-color: rgba(21, 21, 21, 0.8);
}

.rule-item h4 {
    color: var(--main-color);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    letter-spacing: 0.5px;
}

.rule-item p {
    color: var(--text-gray);
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

.rule-item p:last-child {
    margin-bottom: 0;
}

.rule-item ul {
    color: var(--text-gray);
    line-height: 1.8;
    margin-left: 1.5rem;
    margin-top: 0.5rem;
}

.rule-item ul li {
    margin-bottom: 0.5rem;
}

.rule-item.note {
    background-color: rgba(229, 189, 99, 0.05);
    border-color: rgba(229, 189, 99, 0.3);
}

.rule-item.warning {
    background-color: rgba(231, 76, 60, 0.05);
    border-color: rgba(231, 76, 60, 0.3);
}

.rule-item.warning p {
    color: #e74c3c;
    font-weight: 500;
}

.rule-item.success {
    background-color: rgba(46, 204, 113, 0.05);
    border-color: rgba(46, 204, 113, 0.3);
}

.rule-item.success p {
    color: #2ecc71;
    font-weight: 500;
}

.command-list {
    list-style: none;
    margin-left: 0 !important;
}

.command-list li {
    padding-left: 1.5rem;
    position: relative;
}

.command-list li::before {
    content: '►';
    position: absolute;
    left: 0;
    color: var(--main-color);
    font-size: 0.8rem;
}

code {
    background-color: var(--lighter-bg);
    color: var(--main-color);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    border: 1px solid rgba(229, 189, 99, 0.2);
}

strong {
    color: var(--main-color);
    font-weight: 700;
}

.footer {
    background-color: var(--main-bg);
    padding: 3rem 0;
    border-top: 1px solid var(--lighter-bg);
    margin-top: 4rem;
}

.footer-content {
    text-align: center;
}

.footer-logo {
    height: 100px;
    width: auto;
    margin-bottom: 1rem;
}

.footer-text {
    color: var(--text-gray);
    font-size: 0.9rem;
}

.credits {
    background-color: var(--main-bg);
    padding: 1.5rem 0;
    border-top: 1px solid var(--lighter-bg);
    text-align: center;
}

.credits-text {
    color: var(--text-gray);
    font-size: 0.85rem;
    margin: 0;
}

.rule-section.hidden {
    display: none;
}

@media (max-width: 992px) {
    .rules-layout {
        grid-template-columns: 1fr;
    }

    .rules-sidebar {
        position: static;
        max-height: none;
    }
}

@media (max-width: 768px) {
    .rules-title {
        font-size: 2rem;
    }

    .rules-subtitle {
        font-size: 1rem;
    }

    .section-number {
        font-size: 2rem;
        display: block;
        margin-bottom: 0.5rem;
    }

    .section-title {
        font-size: 1.4rem;
        display: block;
    }

    .rule-section {
        padding: 1.5rem;
    }

    .rule-item {
        padding: 1rem;
    }

    .logo {
        height: 50px;
    }

    .logo-text {
        font-size: 1.2rem;
    }

    .back-btn {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }

    .header-content {
        flex-wrap: wrap;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .rules-title {
        font-size: 1.5rem;
    }

    .container {
        padding: 0 15px;
    }

    .rule-section {
        padding: 1rem;
    }

    .rule-item h4 {
        font-size: 1.1rem;
    }
}