* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-color: #333;
    --bg-color: #f5f6fa;
    --card-bg: #ffffff;
    --border-color: #dfe6e9;
    --hover-color: #ecf0f1;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 1.5rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    flex-direction: row;
    gap: 0;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 2rem;
}

.header h1,
.site-brand {
    font-size: 2rem;
    margin: 0;
    white-space: nowrap;
    flex-shrink: 0;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.hamburger span {
    width: 32px;
    height: 3px;
    background-color: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(10px, 10px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.header-nav {
    display: flex;
    gap: 1.5rem;
    justify-content: flex-end;
    flex-wrap: wrap;
    align-items: center;
    flex: 1;
}

.continent-link {
    color: white;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.5rem 0.8rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.continent-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

@media (max-width: 1024px) {
    .header h1,
    .site-brand {
        font-size: 1.6rem;
    }

    .continent-link {
        font-size: 0.9rem;
        padding: 0.4rem 0.6rem;
    }

    .header-nav {
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .header h1,
    .site-brand {
        font-size: 1.5rem;
    }

    .hamburger {
        display: flex;
    }

    .header-nav {
        display: none;
        flex-direction: column;
        gap: 0.5rem;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
        padding: 1rem 2rem;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        justify-content: flex-start;
    }

    .header-nav.active {
        display: flex;
    }

    .continent-link {
        display: block;
        padding: 0.8rem 0;
        font-size: 1rem;
    }

    .header-content {
        position: relative;
    }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.intro-section {
    background: white;
    padding: 2rem;
    margin: 2rem 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.intro-text {
    font-size: 1.1rem;
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
}

.intro-title {
    font-size: 1.45rem;
    color: var(--primary-color);
    margin: 0 0 0.75rem;
}

.search-bar {
    background: white;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.search-input {
    width: 100%;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    transition: border-color 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.content-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.tab-button {
    padding: 1rem 2rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s;
    color: var(--text-color);
}

.tab-button:hover {
    background: var(--hover-color);
    transform: translateY(-2px);
}

.tab-button.active {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

.regions-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.region-card {
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.region-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.region-header {
    background: var(--primary-color);
    color: white;
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.region-header h2 {
    font-size: 1.5rem;
}

.toggle-icon {
    font-size: 1.5rem;
    transition: transform 0.3s;
}

.region-card.expanded .toggle-icon {
    transform: rotate(180deg);
}

.countries-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.region-card.expanded .countries-list {
    max-height: 600px;
    overflow-y: auto; 
}

.country-item {
    padding: 0.8rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.2s;
}

.country-item:hover {
    background: var(--hover-color);
}

.country-item:last-child {
    border-bottom: none;
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--secondary-color);
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.5rem;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    animation: slideDown 0.3s;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    color: #aaa;
    float: right;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover,
.close:focus {
    color: #000;
}

.modal-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.modal-header h2 {
    color: var(--primary-color);
}

.modal-tabs {
    margin-bottom: 1.5rem;
}

.modal-tabs .content-tabs {
    margin-bottom: 0;
}

.modal-tabs .tab-button {
    padding: 0.7rem 1.2rem;
    font-size: 0.9rem;
}

.media-list {
    list-style: none;
}

.media-item {
    padding: 1rem;
    margin-bottom: 0.5rem;
    background: var(--bg-color);
    border-radius: 6px;
    border-left: 4px solid var(--secondary-color);
}

.media-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.media-item a {
    color: var(--secondary-color);
    text-decoration: none;
}

.media-item a:hover {
    text-decoration: underline;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: #999;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

footer {
    background: var(--primary-color);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

.section-title {
    font-size: 2rem;
    color: var(--primary-color);
    margin: 3rem 0 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--secondary-color);
}

.top-media-section {
    margin: 3rem 0;
}

.media-type-section {
    margin-bottom: 3rem;
}

.media-type-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin: 2rem 0 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--secondary-color);
}

.section-description {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.top-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.top-media-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
}

.top-media-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.media-logo-placeholder {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 1rem;
}

.top-media-card .media-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin: 0 auto;
    border-radius: 8px;
}

.top-media-card .media-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

.top-media-card .media-description {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
    margin: 0;
}

/* Continents Section Styles */
.continents-section {
    margin: 3rem 0;
}

.continent-showcase {
    margin-bottom: 3rem;
}

.continent-showcase-title {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: 700;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--secondary-color);
}

.countries-showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.country-showcase-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.country-showcase-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.country-showcase-card a {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: inherit;
}

.country-showcase-flag {
    width: 100px;
    height: 60px;
    border-radius: 4px;
    object-fit: cover;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.country-showcase-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

.flag-showcase-placeholder {
    width: 100px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
}

.view-all-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 2rem 1.5rem;
    justify-content: center;
}

.view-all-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 4px 16px rgba(52, 152, 219, 0.3);
}

.view-all-card a {
    color: white;
    text-decoration: none;
}

.view-all-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    font-weight: 700;
    font-size: 1.05rem;
}

.view-all-content .arrow {
    font-size: 1.5rem;
    transition: transform 0.3s;
}

.view-all-card:hover .arrow {
    transform: translateX(5px);
}

@media (max-width: 768px) {
    .header h1,
    .site-brand {
        font-size: 1.8rem;
    }

    .container {
        padding: 0 1rem;
    }

    .content-tabs {
        flex-direction: column;
    }

    .tab-button {
        width: 100%;
    }

    .regions-container {
        grid-template-columns: 1fr;
    }

    .top-media-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1rem;
    }

    .top-media-card {
        padding: 1rem;
        gap: 0.75rem;
    }

    .media-logo-placeholder,
    .top-media-card .media-logo {
        width: min(90px, 100%);
        height: auto;
        aspect-ratio: 1 / 1;
    }

    .top-media-card .media-name {
        font-size: 0.92rem;
    }

    .top-media-card .media-description {
        font-size: 0.82rem;
    }

    .media-type-title {
        font-size: 1.4rem;
    }

    .countries-showcase-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .continent-showcase-title {
        font-size: 1.5rem;
    }

}

@media (max-width: 480px) {
    .top-media-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.85rem;
    }

    .top-media-card {
        padding: 0.85rem;
    }

    .media-logo-placeholder,
    .top-media-card .media-logo {
        width: min(72px, 100%);
    }

    .top-media-card .media-name {
        font-size: 0.84rem;
    }
}
