/* CasterClub Global Styles - Mobile Responsive */

/* CSS Custom Properties for consistent theming */
:root {
    --primary-green: #78D691;
    --primary-yellow: #FFFF00;
    --dark-teal: #003134;
    --medium-teal: #004140;
    --light-teal: #006363;
    --black: #000;
    --dark-gray: #222;
    --medium-gray: #333;
    --light-gray: #CCC;
    --cyan: #00FFFF;
    --font-family: Arial, sans-serif;
}

/* Performance & Flicker Reduction */
#loadingOverlay,
.tab-content,
.featured-station-container,
.stats-box,
.card,
.mobile-menu {
    will-change: opacity, transform;
}

.tab-content {
    min-height: 150px;
}

body {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Reset & base layout */
* {
    box-sizing: border-box;
}

body, html {
    margin: 0;
    padding: 0;
    border: 0;
    height: 100%;
    font-family: var(--font-family);
    background-color: var(--black);
    color: var(--light-gray);
    line-height: 1.4;
}

/* Responsive Typography */
h1, h2, h3, h4, h5, h6 {
    margin: 0 0 1rem 0;
    line-height: 1.2;
}

h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); }
h3 { font-size: clamp(1.3rem, 3vw, 1.7rem); }
h4 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); }

p {
    margin: 0 0 1rem 0;
    line-height: 1.6;
}

/* Link styles */
a, a:visited {
    color: var(--primary-yellow);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--cyan);
    text-decoration: underline;
}

/* Container and Layout */
.container {
    width: 100%;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-wrapper {
    flex: 1;
    display: flex;
    width: 100%;
    align-items: stretch;
}

/* Header Styles */
.header {
    background-color: var(--dark-teal);
    color: var(--primary-yellow);
    padding: 1rem;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
}

.header-logo {
    flex: 1;
}

.header-logo img {
    max-height: 50px;
    height: auto;
}

/* Mobile Menu Button */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: 2px solid var(--primary-green);
    color: var(--primary-green);
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 4px;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    background-color: var(--primary-green);
    color: var(--black);
}

.hamburger {
    display: flex;
    flex-direction: column;
    width: 20px;
    height: 15px;
    justify-content: space-between;
}

.hamburger span {
    display: block;
    height: 2px;
    background-color: currentColor;
    transition: all 0.3s ease;
}

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

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

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

/* Navigation */
.nav {
    background-color: var(--light-teal);
    padding: 0;
    width: 100%;
}

.submenu-bar {
    background-color: var(--black);
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    border-bottom: 1px solid var(--primary-green);
    font-size: 0.9rem;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.submenu-bar::-webkit-scrollbar {
    display: none;
}

.submenu-bar a {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    margin-right: 0.5rem;
    color: var(--primary-green);
    font-weight: bold;
    text-decoration: none;
    border: 1px solid var(--primary-green);
    background-color: var(--black);
    box-shadow: 0 0 3px var(--primary-green);
    transition: all 0.3s ease;
    border-radius: 4px;
    white-space: nowrap;
    min-width: fit-content;
}

.submenu-bar a.active {
    background-color: var(--dark-teal);
    color: #FFFFFF;
}

.submenu-bar a:hover {
    background-color: var(--dark-teal);
    color: var(--primary-yellow);
    transform: translateY(-1px);
}

/* Mobile Menu Overlay */
.mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    background-color: var(--dark-teal);
    z-index: 9999;
    transition: left 0.3s ease;
    overflow-y: auto;
    padding-top: 4rem;
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--primary-green);
    font-size: 1.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.mobile-menu-close:hover {
    background-color: var(--primary-green);
    color: var(--black);
}

/* Sidebar */
.left {
    width: 200px;
    padding: 1rem;
    margin-right: 1rem;
    background-color: var(--dark-teal);
    display: flex;
    flex-direction: column;
    min-height: 100%;
    transition: all 0.3s ease;
}

.content {
    flex: 1;
    padding: 1rem;
    min-height: 100%;
    padding-bottom: 80px;
}

/* Left Menu Styles */
.left-menu {
    font-size: 0.8rem;
    margin-top: 1rem;
    color: var(--primary-green);
}

.left-menu h3 {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--primary-green);
    padding-bottom: 0.5rem;
}

.menu-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
}

.menu-list li {
    margin-bottom: 0.3rem;
}

.menu-list a {
    display: flex;
    align-items: center;
    color: var(--primary-green);
    background-color: var(--black);
    border: 1px solid var(--primary-green);
    box-shadow: 0 0 3px var(--primary-green);
    padding: 0.5rem 0.7rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
}

.menu-list a:hover {
    background-color: var(--dark-teal);
    color: var(--primary-yellow);
    transform: translateX(4px);
}

.menu-list a::before {
    content: "➤";
    margin-right: 0.5rem;
    color: var(--primary-green);
    font-size: 0.7rem;
    transition: transform 0.2s ease;
}

.menu-list a:hover::before {
    transform: translateX(4px);
}

/* Details/Summary styling */
details summary {
    color: var(--primary-green);
    background-color: var(--black);
    border: 1px solid var(--primary-green);
    box-shadow: 0 0 3px var(--primary-green);
    padding: 0.5rem 0.7rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.8rem;
    cursor: pointer;
    list-style: none;
    outline: none;
    transition: all 0.3s ease;
}

details[open] summary {
    background-color: var(--dark-teal);
}

details ul.menu-list {
    margin-left: 1rem;
}

/* Card System */
.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 1rem 0;
}

.card {
    background: linear-gradient(145deg, var(--dark-gray), var(--medium-gray));
    border: 1px solid var(--primary-green);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3), 0 0 10px rgba(120, 214, 145, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-green), var(--primary-yellow));
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4), 0 0 20px rgba(120, 214, 145, 0.2);
}

.card-header {
    margin-bottom: 1rem;
}

.card-title {
    color: var(--primary-green);
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 4px var(--primary-green);
}

.card-subtitle {
    color: var(--primary-yellow);
    font-size: 0.9rem;
    opacity: 0.9;
}

.card-content {
    color: var(--light-gray);
    line-height: 1.6;
}

.card-content ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.card-content li {
    margin-bottom: 0.5rem;
    color: var(--light-gray);
}

.card-content strong {
    color: var(--primary-yellow);
}

.card-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--medium-gray);
}

/* Tab System */
.tab-header {
    padding: 1rem;
    border-bottom: 1px solid var(--medium-gray);
    background-color: #001f1f;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tab-button {
    background-color: var(--medium-teal);
    color: var(--primary-yellow);
    border: 1px solid var(--primary-green);
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tab-button.active {
    background-color: #016263;
    color: var(--primary-green);
    box-shadow: 0 0 10px rgba(120, 214, 145, 0.3);
}

.tab-button:hover {
    background-color: #026d6d;
    transform: translateY(-1px);
}

/* Modern Footer */
.footer {
    background: linear-gradient(135deg, var(--dark-teal), var(--black));
    color: var(--primary-yellow);
    padding: 2rem 1rem 1rem;
    width: 100%;
    margin-top: auto;
    border-top: 2px solid var(--primary-green);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h4 {
    color: var(--primary-green);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 4px var(--primary-green);
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--light-gray);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

.footer-section a:hover {
    color: var(--primary-green);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    border-top: 1px solid var(--medium-gray);
    font-size: 0.8rem;
    color: var(--light-gray);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background-color: var(--medium-teal);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: var(--primary-green);
    color: var(--black);
    transform: translateY(-2px);
}

/* Tables */
.station-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.8rem;
    background-color: var(--medium-gray);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.station-table th {
    background-color: #001f1f;
    color: var(--primary-green);
    padding: 1rem 0.7rem;
    text-align: left;
    font-size: 0.9rem;
    font-weight: bold;
}

.station-table td {
    padding: 0.7rem;
    vertical-align: top;
    border-top: 1px solid var(--dark-gray);
    font-size: 0.8rem;
}

.station-table tr:nth-child(odd) {
    background-color: #111;
}

.station-table tr:nth-child(even) {
    background-color: #1c1c1c;
}

.station-table tr:hover {
    background-color: var(--dark-teal);
}

.station-table b {
    font-size: 0.9rem;
    color: var(--primary-yellow);
}

/* Icons */
.icon-cc {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 0.5rem;
    border-radius: 3px;
    background: linear-gradient(145deg, var(--primary-green), var(--medium-teal));
    color: var(--black);
    font-size: 0.7rem;
    font-weight: bold;
    text-align: center;
    line-height: 16px;
    font-family: monospace;
    box-shadow: 0 0 2px var(--primary-green);
}

.icon-cc::before {
    content: "CC";
}

/* Icon pseudo-elements */
.icon-user::before { content: "👤"; margin-right: 0.5rem; }
.icon-lock::before { content: "🔒"; margin-right: 0.5rem; }
.icon-forum::before { content: "💬"; margin-right: 0.5rem; }
.icon-article::before { content: "📰"; margin-right: 0.5rem; }
.icon-news::before { content: "🗞️"; margin-right: 0.5rem; }
.icon-radio::before { content: "📡"; margin-right: 0.5rem; }
.icon-player::before { content: "🎛️"; margin-right: 0.5rem; }

/* Loading Animation */
#loadingOverlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--medium-teal);
    border-top: 4px solid var(--primary-yellow);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    color: var(--primary-yellow);
    margin-top: 1rem;
    font-size: 1.1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .left {
        display: none;
    }

    .main-wrapper {
        flex-direction: column;
    }

    .content {
        padding: 1rem 0.5rem;
    }

    .submenu-bar {
        padding: 0.5rem;
        justify-content: flex-start;
    }

    .submenu-bar a {
        padding: 0.4rem 0.8rem;
        margin-right: 0.3rem;
        font-size: 0.8rem;
    }

    .cards-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .card {
        padding: 1rem;
    }

    .tab-header {
        padding: 0.5rem;
    }

    .tab-button {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    .station-table {
        font-size: 0.7rem;
    }

    .station-table th,
    .station-table td {
        padding: 0.5rem 0.3rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .social-links {
        justify-content: center;
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 0.7rem;
    }

    .content {
        padding: 0.5rem;
    }

    .card {
        padding: 0.8rem;
    }

    .card-title {
        font-size: 1.1rem;
    }

    .submenu-bar a {
        padding: 0.3rem 0.6rem;
        font-size: 0.7rem;
    }
}

/* Utility Classes */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }