/* ===== Rules & Scoring Page Styles ===== */

.rules-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* Hero Banner */
.rules-hero {
    position: relative;
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 50%, #1e3a5f 100%);
    padding: 50px 40px;
    border-radius: 12px;
    margin-bottom: 30px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(30, 58, 95, 0.3);
}

.rules-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255,255,255,0.08) 0%, transparent 40%);
    pointer-events: none;
}

.rules-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.rules-hero h1 {
    color: #fff;
    font-weight: 700;
    font-size: 2.2rem;
    margin-bottom: 12px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.rules-hero p {
    color: rgba(255,255,255,0.85);
    font-size: 1.1rem;
    margin: 0;
}

.rules-hero-icon {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 100px;
    color: rgba(255,255,255,0.1);
}

.rules-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 25px;
    overflow: hidden;
}
.rules-section .section-header {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
    color: white;
    padding: 15px 20px;
    font-weight: 600;
    font-size: 1.1rem;
}
.section-content {
    padding: 20px;
}
.points-table {
    width: 100%;
    border-collapse: collapse;
}
.points-table th, .points-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}
.points-table th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    font-weight: 600;
    color: #1e3a5f;
}
.points-table tr:last-child td {
    border-bottom: none;
}
.points-table tr:hover td {
    background-color: #f8f9fa;
}
.points-positive {
    color: #28a745;
    font-weight: 600;
}
.points-negative {
    color: #dc3545;
    font-weight: 600;
}
.example-box {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 4px solid #1e3a5f;
    padding: 15px;
    margin: 15px 0;
    border-radius: 0 8px 8px 0;
}
.example-box h5 {
    margin: 0 0 10px 0;
    color: #1e3a5f;
    font-weight: 600;
}
.position-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
}
.badge-gk { background: #ffc107; color: #333; }
.badge-def { background: #17a2b8; color: white; }
.badge-mid { background: #28a745; color: white; }
.badge-fwd { background: #dc3545; color: white; }
.captain-badge {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #333;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
}
.vice-captain-badge {
    background: #6c757d;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}
.toc-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
}
.toc-list li {
    padding: 0;
}
.toc-list a {
    display: block;
    color: #1e3a5f;
    text-decoration: none;
    font-weight: 500;
    padding: 10px 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    border: 1px solid #dee2e6;
    transition: all 0.2s ease;
}
.toc-list a:hover {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
    color: white;
    border-color: #1e3a5f;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(30, 58, 95, 0.2);
}

/* Rules section headings - replaces inline margin-top styles */
.rules-section-heading {
    margin-top: 20px;
}
.rules-section-heading-lg {
    margin-top: 25px;
}
.rules-section-table-gap {
    margin-top: 10px;
}
.rules-section-note {
    margin-top: 10px;
}
.rules-section-content-scroll {
    overflow-x: auto;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .rules-hero {
        padding: 35px 25px;
    }
    .rules-hero h1 {
        font-size: 1.6rem;
    }
    .rules-hero p {
        font-size: 0.95rem;
    }
    .rules-hero-icon {
        display: none;
    }
    .toc-list {
        grid-template-columns: 1fr;
    }
    .rules-section .section-header {
        font-size: 1rem;
        padding: 12px 15px;
    }
    .section-content {
        padding: 15px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .points-table {
        min-width: 500px;
    }
    .points-table th, .points-table td {
        padding: 10px 8px;
        font-size: 0.85rem;
        white-space: nowrap;
    }
    .points-table td:nth-child(3),
    .points-table td:nth-child(4) {
        white-space: normal;
        min-width: 120px;
    }
    .example-box {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}
