:root {
    --primary-color: #0077be;
    --secondary-color: #00a8e8;
    --accent-color: #f7b538;
    --bg-color: #f4f7f6;
    --card-bg: #ffffff;
    --text-color: #333;
    --text-secondary: #666;
    --border-radius: 12px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Header */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.container {
    max-width: 95%;
    /* Wider layout */
    margin: 0 auto;
    padding: 0 20px;
}

.brand {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-logo {
    height: 50px;
    width: auto;
}

.brand h1 {
    font-size: 1.8rem;
    font-weight: 700;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 2.5rem 20px;
    text-align: center;
    border-radius: 0 0 50% 50% / 20px;
    margin-bottom: 2rem;
}

.hero h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.hero p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Section Titles */
.section-title {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    border-left: 5px solid var(--accent-color);
    padding-left: 10px;
}

/* Top Events (Cards) */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 3rem;
}

.card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 0;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.card-image {
    width: 100%;
    height: 150px;
    background-color: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.card-meta {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
}

.btn-pill {
    display: inline-block;
    padding: 5px 15px;
    background-color: var(--accent-color);
    color: #fff;
    border-radius: 20px;
    font-size: 0.8rem;
    text-decoration: none;
    font-weight: bold;
    align-self: flex-start;
    margin-top: auto;
}

/* List View (Table Grid) */
.list-grid-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.tournament-table {
    width: 100%;
    border-collapse: collapse;
}

.tournament-table th,
.tournament-table td {
    padding: 20px 25px;
    /* Larger padding */
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 1.1rem;
    /* Larger font */
}

.tournament-table th {
    background-color: #f9f9f9;
    color: var(--secondary-color);
    font-weight: 600;
}

.tournament-table tr {
    cursor: pointer;
    transition: background-color 0.2s;
}

.tournament-table tr:hover {
    background-color: #f0f7fb;
}

.tournament-table td i {
    color: var(--accent-color);
    margin-right: 5px;
}


/* Controls */
.controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 2rem;
}

.btn {
    padding: 8px 20px;
    background-color: white;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 25px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn:hover,
.btn.active {
    background-color: var(--primary-color);
    color: white;
}

/* Modal/Detailed View */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s;
}

.modal-overlay.open {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: white;
    width: 95%;
    /* Wider on mobile */
    max-width: 1400px;
    height: 90vh;
    border-radius: var(--border-radius);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

.modal-header {
    background: var(--primary-color);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-modal {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

.btn-refresh {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-refresh:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: white;
    transform: rotate(180deg);
}

.btn-refresh:active {
    transform: rotate(180deg) scale(0.95);
}


.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background-color: #f9f9f9;
}

/* Accordion Styles */
.accordion-item {
    background: white;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.accordion-header {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background-color: #fff;
    transition: background-color 0.2s;
}

.accordion-header:hover {
    background-color: #f0f7fb;
}

.accordion-header.active {
    background-color: #e3f2fd;
    border-bottom: 1px solid #bbdefb;
}

.accordion-title {
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    gap: 15px;
    align-items: center;
}

.accordion-icon {
    transition: transform 0.3s;
}

.accordion-header.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    display: none;
    padding: 0;
}

.accordion-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Button styles in accordion */
.btn-simulate, .btn-event-pdf {
    margin-left: auto;
    margin-right: 15px;
    font-size: 1.2rem;
    cursor: pointer;
    background: none;
    border: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-simulate { 
    color: #0098a5; 
}

.btn-event-pdf { 
    color: #d32f2f; 
    text-decoration: none;
}

.btn-simulate:hover, .btn-event-pdf:hover {
    opacity: 0.8;
}

/* Results Table inside Accordion */
.results-table {
    width: 100%;
    border-collapse: collapse;
}

.results-table th,
.results-table td {
    padding: 12px 20px;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
}

.results-table th {
    background-color: #fafafa;
    color: #666;
    font-weight: 600;
}

.results-table tr:last-child td {
    border-bottom: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    /* Global Container */
    .container {
        padding: 0 15px;
    }

    /* Header Polish */
    header .brand h1 {
        font-size: 1.4rem;
    }
    .header-logo {
        height: 40px;
    }

    /* Hero Optimization */
    .hero {
        padding: 1.8rem 15px;
        border-radius: 0 0 30px 30px;
    }
    .hero h2 {
        font-size: 1.6rem;
    }
    .hero p {
        font-size: 1rem;
    }

    /* Tournament Cards (converted from table) */
    .tournament-table thead {
        display: none;
    }

    .tournament-table, 
    .tournament-table tbody, 
    .tournament-table tr, 
    .tournament-table td {
        display: block;
        width: 100%;
    }

    .tournament-table tr {
        background: #fff;
        border-radius: 12px;
        margin-bottom: 20px;
        padding: 18px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.05);
        border: 1px solid #edf2f7;
    }

    .tournament-table tr:hover {
        background-color: #fff;
        transform: translateY(-2px);
    }

    .tournament-table td {
        padding: 6px 0 !important;
        border-bottom: none !important;
        font-size: 1rem !important;
    }

    .tournament-table td:first-child {
        font-size: 1.15rem !important;
        color: var(--primary-color);
        margin-bottom: 12px;
        padding-bottom: 10px !important;
        border-bottom: 2px solid #f7fafc !important;
    }

    .tournament-table td:last-child {
        margin-top: 12px;
        padding-top: 12px !important;
        border-top: 1px solid #f1f5f9;
        text-align: right;
        font-weight: 700;
        background: none !important;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .controls {
        flex-direction: column;
        gap: 12px;
    }

    .modal-content {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    .accordion-header {
        padding: 12px 15px;
        flex-wrap: wrap;
    }

    .accordion-title {
        flex: 1 1 100%;
        margin-bottom: 10px;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .btn-simulate, .btn-event-pdf {
        margin-left: 0 !important;
        margin-right: 20px !important;
        font-size: 1rem !important;
    }

    .accordion-icon {
        margin-left: auto;
    }

    /* Results Table Scroll */
    .accordion-content {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .results-table {
        min-width: 100%; /* Permite que las tablas se ajusten al ancho del modal o pantalla */
    }

    @media (max-width: 600px) {
        /* Hide secondary columns ONLY in main results table and ONLY for swimmer data rows */
        .accordion-content .results-table th:nth-child(1), .accordion-content .results-table .swimmer-row td:nth-child(1), /* Serie */
        .accordion-content .results-table th:nth-child(2), .accordion-content .results-table .swimmer-row td:nth-child(2), /* Carril */
        .accordion-content .results-table th:nth-child(4), .accordion-content .results-table .swimmer-row td:nth-child(4), /* Club */
        .accordion-content .results-table th:nth-child(5), .accordion-content .results-table .swimmer-row td:nth-child(5) { /* T. Insc */
            display: none;
        }
    }

    .results-table th,
    .results-table td {
        padding: 10px 6px; /* Padding más compacto para móvil */
        font-size: 0.8rem; /* Fuente ligeramente más pequeña */
    }

    /* Sticky Swimmer Column for better UX (ONLY in accordion results) */
    .accordion-content .results-table tr td:nth-child(3) {
        position: sticky;
        left: 0;
        background: #fff;
        z-index: 2;
        box-shadow: 2px 0 5px rgba(0,0,0,0.05);
    }
    .accordion-content .results-table tr th:nth-child(3) {
        position: sticky;
        left: 0;
        background: #fafafa;
        z-index: 3;
        box-shadow: 2px 0 5px rgba(0,0,0,0.05);
    }
    .swimmer-row:hover td:nth-child(3) {
        background: #f1f8ff;
    }

    /* Partials Grid Tweaks */
    .partials-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: 8px;
    }
}

/* Result Details Styles */
.swimmer-row {
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
}

.swimmer-row:hover {
    background-color: #f0f7fb !important;
    border-left: 4px solid var(--primary-color);
    box-shadow: inset 0 0 10px rgba(0, 119, 190, 0.05);
}

.swimmer-row:hover .accordion-toggle-icon {
    color: var(--secondary-color);
    transform: translateY(-50%) scale(1.2) !important;
}

.diff-improve {
    color: #28a745;
    /* Green */
    font-weight: 600;
}

.diff-worse {
    color: #dc3545;
    /* Red */
    font-weight: 600;
}

.diff-neutral {
    color: #6c757d;
}

.partials-row {
    display: none;
    background-color: #f8f9fa;
}

.partials-row.active {
    display: table-row;
}

.partials-container {
    padding: 15px;
    border-top: 2px dashed #e9ecef;
}

.mobile-row-details {
    display: none;
    background: #f1f5f9;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid #e2e8f0;
}

@media (max-width: 600px) {
    .mobile-row-details {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }
    .detail-item {
        background: #fff;
        padding: 4px 10px;
        border-radius: 6px;
        font-size: 0.85rem;
        color: #475569;
        border: 1px solid #cbd5e1;
    }
}

.partials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.partial-item {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 8px;
    text-align: center;
}

.partial-label {
    font-size: 0.75rem;
    color: #6c757d;
    display: block;
    margin-bottom: 2px;
}

.partial-value {
    font-weight: 600;
    font-size: 0.9rem;
    color: #333;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}


.profile-modal-content {
    max-width: 800px;
    height: 85vh;
    background: #f4f7f6;
}

.simulator-modal-content {
    max-width: 1000px;
    height: 90vh;
    background: #dfdfdf;
    display: flex;
    flex-direction: column;
}

.profile-card {
    background: white;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.profile-hero {
    background: linear-gradient(135deg, #2980b9, #3498db, #16a085);
    color: white;
    padding: 30px;
    display: flex;
    gap: 30px;
    align-items: center;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    background: rgba(255,255,255,0.2);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    border: 3px solid white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    position: relative; 
}

.profile-main-info h3 {
    font-size: 2.2rem;
    margin: 0 0 10px 0;
}

.profile-meta {
    display: flex;
    gap: 20px;
    font-size: 1.1rem;
    opacity: 0.9;
}

.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 30px;
}

.profile-stat-box {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    text-align: center;
    border: 1px solid #eee;
}

.profile-stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
    display: block;
}

.profile-stat-label {
    color: #666;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.medal-summary {
    display: flex;
    justify-content: space-around;
    padding: 20px;
    background: #fff;
    margin: 0 30px 30px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    flex-wrap: wrap;
    gap: 15px;
}

.medal-item {
    text-align: center;
}

.medal-item i {
    font-size: 2.5rem;
    margin-bottom: 5px;
}

.gold-medal { color: #f1c40f; }
.silver-medal { color: #bdc3c7; }
.bronze-medal { color: #e67e22; }

/* Simulator Pool */
.piscina {
    background: linear-gradient(180deg, #bbdefb 0%, #e3f2fd 50%, #bbdefb 100%);
    border: 5px solid #0098a5;
    border-radius: 15px;
    padding: 10px;
    position: relative;
    box-shadow: inset 0 0 30px rgba(0, 152, 165, 0.3);
    margin: 20px auto;
    width: 100%;
}

.piscina-lane {
    height: 60px;
    border-bottom: 2px dashed rgba(0, 152, 165, 0.4);
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
}

.piscina-lane:last-child {
    border-bottom: none;
}

.lane-num {
    position: absolute;
    left: -35px;
    width: 25px;
    height: 25px;
    background: #0098a5;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.8rem;
    z-index: 5;
}

.sim-swimmer {
    width: 35px;
    height: 35px;
    background: linear-gradient(45deg, #e91e63, #f06292);
    border: 3px solid white;
    border-radius: 50%;
    position: absolute;
    left: 10px;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sim-swimmer::after {
    content: attr(data-cap);
    font-size: 10px;
    color: white;
    font-weight: bold;
}

.sim-swimmer.finished {
    background: linear-gradient(45deg, #4caf50, #66bb6a);
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.6);
}

.sim-swimmer.dns { background: #95a5a6; }
.sim-swimmer.dq { background: #f44336; }
.sim-swimmer.dnf { background: #ff9800; }

.swimmer-label {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.7);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.sim-swimmer:hover .swimmer-label {
    opacity: 1;
}

@media (max-width: 600px) {
    .profile-hero {
        flex-direction: column;
        text-align: center;
    }
    .profile-meta {
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* Profile Tabs */
.profile-tabs {
    display: flex;
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 0 20px;
    gap: 10px;
    position: relative; 
    z-index: 10;       
}

.profile-tab {
    padding: 12px 20px;
    cursor: pointer;
    font-weight: 600;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

.profile-tab:hover {
    color: var(--primary-color);
    background: #f8f9fa;
}

.profile-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

.profile-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.profile-info-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.profile-info-icon {
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.profile-avatar .active-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid rgba(255,255,255,0.5);
    border-radius: 15px;
    animation: pulse-ring 2s infinite;
    top: 0;
    left: 0;
    pointer-events: none; /* Do not block clicks */
}

@keyframes pulse-ring {
    0% { transform: scale(0.95); opacity: 0.5; }
    50% { transform: scale(1.05); opacity: 0.2; }
    100% { transform: scale(0.95); opacity: 0.5; }
}

@media (max-width: 600px) {
    .profile-tabs {
        overflow-x: auto;
        white-space: nowrap;
    }
}

.badge-piscina {
    background-color: #e3f2fd;
    color: #1976d2;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid #bbdefb;
}

/* Comparison Tool Styles */
.comparison-modal-content {
    max-width: 1000px !important;
    width: 95% !important;
}

.setup-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
}

.setup-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.setup-item label {
    font-weight: 600;
    color: #444;
    font-size: 0.9rem;
}

.comp-select {
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.comp-select:focus {
    border-color: var(--primary-color);
}

.tournaments-list-mini {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 10px;
    max-height: 200px;
    overflow-y: auto;
    padding: 15px;
    background: white;
    border: 1px solid #eee;
    border-radius: 10px;
    margin-top: 10px;
}

.tourney-item-mini {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 6px;
    background: #fdfdfd;
    border: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.2s;
}

.tourney-item-mini:hover {
    background: #f0f7fb;
}

.tourney-item-mini {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: white;
    border: 1px solid #eee;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.tourney-item-mini:hover {
    border-color: var(--primary-color);
    background: #f0f7ff;
}

.tourney-item-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.tourney-date-badge {
    background: #eef2f7;
    color: #5d6d7e;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    text-transform: uppercase;
}

.tourney-name-text {
    font-size: 0.85rem;
    color: #444;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.stats-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card-mini {
    background: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-top: 4px solid var(--primary-color);
    text-align: center;
}

.stat-card-mini .label {
    display: block;
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 5px;
}

.stat-card-mini .value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-color);
}

.charts-area {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.chart-container-box {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.chart-wrapper {
    position: relative;
    height: 300px;
    width: 100%;
}

.comparison-table-container {
    overflow-x: auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

@media (max-width: 600px) {
    .charts-area {
        grid-template-columns: 1fr;
    }
    .chart-container-box {
        min-height: 250px;
    }
}

.chart-description {
    margin-top: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #555;
    line-height: 1.4;
    border-left: 4px solid #16a085;
}

.chart-description strong {
    color: #2c3e50;
    display: block;
    margin-bottom: 4px;
}
