:root {
    --bg-primary: #121212;
    --accent-primary: #FF443D;
    --accent-secondary: #FF6348;
    --bg-secondary: #1A1A1A;
    --text-light: #FFEDD9;
    --text-muted: rgba(255, 237, 217, 0.7);
    --card-bg: #1E1E1E;
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-light);
    line-height: 1.6;
    padding: 0;
    overflow-x: hidden;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    position: relative;
}

.rules-container {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    margin: 20px;
}

header {
    position: relative;
    padding: 60px 40px 40px;
    background: linear-gradient(135deg, var(--accent-secondary), var(--accent-primary));
    text-align: center;
    box-shadow: 0 10px 30px rgba(255, 68, 61, 0.2);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.logo i {
    font-size: 3rem;
    margin-right: 15px;
    color: var(--text-light);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.logo h1 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-light);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
}

header h2 {
    font-size: 1.8rem;
    font-weight: 500;
    color: var(--text-light);
    margin-bottom: 20px;
}

.header-accent {
    height: 6px;
    width: 120px;
    margin: 0 auto;
    background: var(--text-light);
    border-radius: 3px;
}

nav {
    background: var(--bg-primary);
    padding: 15px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: center;
    border-bottom: 1px solid rgba(255, 68, 61, 0.2);
}

.nav-links {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 5px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.nav-links::-webkit-scrollbar {
    display: none;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 8px 16px;
    border-radius: 20px;
    white-space: nowrap;
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    background: rgba(255, 68, 61, 0.15);
    color: var(--accent-primary);
}

.rules-content {
    padding: 40px;
}

.section {
    margin-bottom: 60px;
    scroll-margin-top: 100px;
}

.intro {
    text-align: center;
    margin-bottom: 40px;
    padding: 25px;
    background: rgba(255, 68, 61, 0.08);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--accent-primary);
}

.intro p {
    font-size: 1.1rem;
}

.section-header {
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    position: relative;
}

.section-header i {
    font-size: 1.8rem;
    color: var(--accent-primary);
    margin-right: 15px;
}

.section-header h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-light);
}

.section-header::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 80px;
    height: 3px;
    background: var(--accent-primary);
    border-radius: 1.5px;
}

.rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 25px;
}

.rule-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    display: flex;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(20px);
    opacity: 0;
    transition: var(--transition);
    border: 1px solid rgba(255, 68, 61, 0.1);
}

.rule-card.visible {
    transform: translateY(0);
    opacity: 1;
}

.rule-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(255, 68, 61, 0.15);
    border-color: rgba(255, 68, 61, 0.3);
}

.rule-number {
    min-width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-secondary), var(--accent-primary));
    color: var(--text-light);
    font-size: 1.8rem;
    font-weight: 700;
}

.rule-content {
    padding: 20px;
    flex: 1;
}

.rule-content h3 {
    color: var(--accent-primary);
    margin-bottom: 10px;
    font-size: 1.3rem;
    font-weight: 600;
}

.rule-content p {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.punishment-section {
    margin-top: 40px;
}

.table-responsive {
    overflow-x: auto;
    border-radius: var(--border-radius);
    background: var(--card-bg);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 68, 61, 0.1);
}

.punishment-table {
    width: 100%;
    border-collapse: collapse;
}

.table-header {
    background: linear-gradient(135deg, var(--accent-secondary), var(--accent-primary));
    color: var(--text-light);
    text-transform: uppercase;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.table-header div {
    padding: 15px 20px;
}

.table-row {
    transition: var(--transition);
    background: var(--card-bg);
    border-bottom: 1px solid rgba(255, 68, 61, 0.1);
}

.table-row:last-child {
    border-bottom: none;
}

.table-row.highlight {
    background: rgba(255, 68, 61, 0.08);
}

.table-row div {
    padding: 15px 20px;
}

.table-header, .table-row {
    display: flex;
}

.col-rule {
    flex: 3;
}

.col-offense {
    flex: 2;
    text-align: center;
}

.footer-note {
    text-align: center;
    margin-top: 60px;
    padding: 25px;
    background: rgba(255, 68, 61, 0.08);
    border-radius: var(--border-radius);
}

.footer-note p:first-child {
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--accent-primary);
    color: var(--text-light);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(255, 68, 61, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--accent-secondary);
    transform: translateY(-5px);
}

.search-container {
    position: relative;
    max-width: 500px;
    margin: 0 auto 40px;
}

.search-box {
    width: 100%;
    padding: 15px 20px 15px 45px;
    border: none;
    border-radius: var(--border-radius);
    background: var(--card-bg);
    color: var(--text-light);
    font-size: 1rem;
    font-family: 'Outfit', sans-serif;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    border: 1px solid rgba(255, 68, 61, 0.1);
}

.search-box:focus {
    outline: none;
    box-shadow: 0 8px 20px rgba(255, 68, 61, 0.15);
    border-color: rgba(255, 68, 61, 0.3);
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-primary);
    font-size: 1.2rem;
}

.accordion-title {
    display: none;
    padding: 15px;
    background: var(--card-bg);
    color: var(--text-light);
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 1px;
    position: relative;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.accordion-title::after {
    content: '\f078';
    font-family: 'Font Awesome 5 Free';
    position: absolute;
    right: 15px;
    transition: var(--transition);
}

.accordion-title.active {
    background: linear-gradient(135deg, var(--accent-secondary), var(--accent-primary));
}

.accordion-title.active::after {
    transform: rotate(180deg);
}

.accordion-content {
    display: block;
}

@media (max-width: 992px) {
    .rules-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
    
    .rules-content {
        padding: 30px;
    }
}

@media (max-width: 768px) {
    header {
        padding: 40px 20px 30px;
    }
    
    .logo h1 {
        font-size: 2.2rem;
    }
    
    header h2 {
        font-size: 1.4rem;
    }
    
    .rules-content {
        padding: 20px;
    }
    
    .accordion-title {
        display: block;
    }
    
    .accordion-content {
        display: none;
    }
    
    .accordion-content.active {
        display: block;
    }
    
    .table-header, .table-row {
        flex-direction: column;
    }
    
    .col-rule, .col-offense {
        text-align: left;
        padding: 10px 15px;
    }
    
    .rules-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .rules-container {
        margin: 10px;
    }
    
    .logo i {
        font-size: 2rem;
    }
    
    .logo h1 {
        font-size: 1.8rem;
    }
    
    header h2 {
        font-size: 1.2rem;
    }
}
