:root {
    --bg-main: #0D0B14;
    --bg-container: #161222;
    --bg-container-hover: #221D31;
    --purple-accent: #9438D8;
    --blue-accent: #31A8E0;
    --pink-accent: #F61C5E;
    --text-primary: #E6EEF6;
    --text-secondary: #9EA8B3;
    --text-muted: #7D8590;
    --font-family: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --border-color: rgba(148, 56, 216, 0.25);
    --border-hover: rgba(148, 56, 216, 0.7);
    --border-glow: 0 0 12px rgba(148, 56, 216, 0.3);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-main);
    color: var(--text-primary);
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    line-height: 1.7;
}

.main-content {
    padding: 1rem;
}

.rules-page-container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2.5rem;
    background: var(--bg-container);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.rules-header {
    text-align: center;
    padding-bottom: 2rem;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.rules-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: var(--purple-accent);
    box-shadow: var(--border-glow);
}

.rules-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.75rem 0;
}

.rules-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

.toc {
    background: rgba(148, 56, 216, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin-bottom: 2.5rem;
}

.toc h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 0;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.toc ol {
    padding-left: 20px;
    margin: 0;
    columns: 2;
    column-gap: 2rem;
}

@media (max-width: 600px) {
    .toc ol {
        columns: 1;
    }
}

.toc li {
    margin-bottom: 0.75rem;
}

.toc a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
    cursor: pointer;
}

.toc a:hover {
    color: var(--purple-accent);
    text-decoration: underline;
}

.rules-content {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
}

.rules-section {
    margin-bottom: 2.5rem;
}

.rules-section:last-child {
    margin-bottom: 0;
}

.rules-section h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 1.5rem;
    margin-bottom: 1.25rem;
    padding-top: 1.5rem;
    padding-bottom: 0.5rem;
    border-top: 1px solid rgba(148, 56, 216, 0.15);
}

.rules-content > .rules-section:first-child h2 {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.rules-section p {
    margin-bottom: 1rem;
}

.rules-section strong {
    color: var(--text-primary);
    font-weight: 600;
}

.rules-section u {
    text-decoration-color: var(--purple-accent);
    text-decoration-thickness: 2px;
    text-underline-offset: 2px;
    color: var(--text-primary);
}

.rules-section a {
    color: var(--blue-accent);
    text-decoration: none;
    font-weight: 500;
}
.rules-section a:hover {
    text-decoration: underline;
}

.rules-section ul {
    list-style-type: none;
    padding-left: 1rem;
    margin-top: 1rem;
}

.rules-section li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 0.75rem;
}

.rules-section li::before {
    content: '→';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--purple-accent);
    font-weight: 700;
    font-size: 1.2rem;
    line-height: 1;
}

.table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-top: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.policy-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.policy-table th,
.policy-table td {
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
}

.policy-table thead {
    background: rgba(148, 56, 216, 0.1);
}

.policy-table th {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
}

.policy-table tbody tr:last-child td {
    border-bottom: none;
}

.policy-table tbody tr:hover {
    background-color: var(--bg-container-hover);
}

.policy-table td strong {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}


@media (max-width: 768px) {
    .rules-page-container {
        padding: 1.5rem;
        margin: 1rem;
    }
    .rules-header h1 {
        font-size: 2rem;
    }
    .rules-header p {
        font-size: 1rem;
    }
    .policy-table {
        font-size: 0.85rem;
    }
    .policy-table th,
    .policy-table td {
        padding: 0.75rem;
    }
}
