:root {
    --bg-color: #050505;
    --card-bg: #0f0f13;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;

    --neon-purple: #b026ff;
    --neon-blue: #00f3ff;
    --neon-pink: #ff0055;
    --neon-green: #00ff9d;

    --youtube-color: #ff0000;
    --twitch-color: #9146ff;
    --kick-color: #53fc18;
    --trovo-color: #1fbc71;

    --font-main: 'Outfit', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background Ambient Glow */
.background-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 10% 20%, rgba(176, 38, 255, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(0, 243, 255, 0.1) 0%, transparent 40%);
    z-index: -1;
    pointer-events: none;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Header */
.main-header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 0.8s ease-out;
}

.main-header h1 {
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 20px rgba(176, 38, 255, 0.5);
}

.main-header .highlight {
    color: transparent;
    -webkit-text-stroke: 1px var(--neon-blue);
    text-shadow: 0 0 10px var(--neon-blue);
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.2rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Streams Grid */
.content-wrapper {
    display: flex;
    gap: 2rem;
    width: 100%;
    align-items: flex-start;
    position: relative;
}

.main-content {
    flex: 1;
    min-width: 0;
    /* Prevents grid overflow */
    display: flex;
    flex-direction: column;
}

.streams-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    width: 100%;
    margin-bottom: 3rem;
}

.stream-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stream-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Platform specific glows on hover */
.stream-card.youtube:hover {
    border-color: var(--youtube-color);
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.2);
}

.stream-card.twitch:hover {
    border-color: var(--twitch-color);
    box-shadow: 0 0 20px rgba(145, 70, 255, 0.2);
}

.stream-card.kick:hover {
    border-color: var(--kick-color);
    box-shadow: 0 0 20px rgba(83, 252, 24, 0.2);
}

.stream-card.trovo:hover {
    border-color: var(--trovo-color);
    box-shadow: 0 0 20px rgba(31, 188, 113, 0.2);
}

.embed-container {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #000;
}

.embed-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Watch Buttons */
.watch-btn {
    display: block;
    width: 100%;
    padding: 1rem;
    text-align: center;
    text-decoration: none;
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
}

.watch-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: 0.5s;
}

.watch-btn:hover::before {
    left: 100%;
}

.youtube-btn:hover {
    background: var(--youtube-color);
    box-shadow: 0 0 15px var(--youtube-color);
}

.twitch-btn:hover {
    background: var(--twitch-color);
    box-shadow: 0 0 15px var(--twitch-color);
}

.kick-btn:hover {
    background: var(--kick-color);
    color: #000;
    box-shadow: 0 0 15px var(--kick-color);
}

.trovo-btn:hover {
    background: var(--trovo-color);
    box-shadow: 0 0 15px var(--trovo-color);
}

/* Chat Toggle - REMOVED */

/* Chat Container */
/* Chat Container - Sidebar */
.chat-container {
    width: 350px;
    height: 70vh;
    background: rgba(15, 15, 19, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(176, 38, 255, 0.3);
    border-radius: 16px;
    overflow: hidden;
    position: sticky;
    top: 2rem;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(176, 38, 255, 0.15);
    transition: all 0.3s ease;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    order: 2;
    z-index: 100;
}

@media (min-width: 1025px) {
    .content-wrapper {
        padding-right: 450px;
        /* Increased space for the fixed sidebar: 350px + 60px gap */
    }

    .chat-container {
        position: fixed;
        right: max(2rem, calc((100vw - 1600px) / 2 + 2rem));
        top: 2rem;
        height: calc(100vh - 4rem);
        max-height: 900px;
    }

    .toggle-arrow {
        display: none;
    }
}

.chat-header {
    background: rgba(176, 38, 255, 0.1);
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid var(--neon-purple);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    cursor: pointer;
}

.toggle-arrow {
    position: absolute;
    right: 1.5rem;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
    color: var(--neon-purple);
}

.chat-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--neon-purple);
    text-shadow: 0 0 10px rgba(176, 38, 255, 0.4);
    letter-spacing: 1px;
}

.chat-container iframe {
    width: 350px;
    /* Force width inside to avoid squash during transition */
    flex-grow: 1;
    height: auto;
}

/* Support Section */
.support-section {
    margin-top: 2rem;
    text-align: center;
}

.support-link {
    display: inline-block;
    transition: transform 0.3s ease;
}

.support-link:hover {
    transform: scale(1.05);
}

.support-gif {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.support-link:hover .support-gif {
    border-color: var(--neon-pink);
    box-shadow: 0 0 30px rgba(255, 0, 85, 0.3);
}

/* Responsive */
@media (max-width: 1024px) {
    .content-wrapper {
        flex-direction: column;
    }

    .main-content {
        order: 1;
        /* Streams go first */
    }

    .chat-container {
        order: 2;
        width: 100%;
        height: 60px;
        /* Header height only when closed */
        position: fixed;
        bottom: 0;
        top: auto;
        left: 0;
        right: 0;
        margin: 0;
        border-radius: 20px 20px 0 0;
        z-index: 1000;
        background: rgba(15, 15, 19, 0.95);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        border-top: 2px solid var(--neon-purple);
        border-left: none;
        border-right: none;
        border-bottom: none;
        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
    }

    .chat-container.open {
        height: 75vh;
    }

    .chat-header {
        height: 60px;
        padding: 0 1.5rem;
    }

    .toggle-arrow {
        display: block;
        transform: rotate(180deg);
        /* Points up when closed */
    }

    .chat-container.open .toggle-arrow {
        transform: rotate(0deg);
        /* Points down when open */
    }

    .chat-container iframe {
        width: 100%;
    }

    .content-wrapper {
        padding-right: 0 !important;
        margin-bottom: 80px;
        /* Space for the bottom bar */
    }
}

@media (max-width: 900px) {
    .streams-grid {
        grid-template-columns: 1fr;
    }

    .main-header h1 {
        font-size: 2.5rem;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Site Footer & Visitor Stats */
.site-footer {
    width: 100%;
    padding: 3rem 2rem 5rem;
    /* Extra bottom padding for mobile chat bar */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: linear-gradient(to bottom, transparent, rgba(176, 38, 255, 0.02));
    margin-top: 4rem;
}

.visitor-stats {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    border: 1px solid rgba(176, 38, 255, 0.2);
    font-size: 0.9rem;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.count-number {
    color: var(--neon-purple);
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    text-shadow: 0 0 10px rgba(176, 38, 255, 0.4);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--neon-green);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--neon-green);
    position: relative;
}

.pulse-dot::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: var(--neon-green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.copyright {
    color: #444;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(3);
        opacity: 0;
    }
}

@media (min-width: 1025px) {
    .site-footer {
        padding-bottom: 3rem;
        /* Normal padding on desktop */
    }
}

/* Offline Placeholder */
.offline-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0a0f 0%, #151520 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    min-height: 300px;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.offline-placeholder::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(176, 38, 255, 0.05) 0%, transparent 70%);
    animation: rotate 10s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.offline-content {
    position: relative;
    z-index: 1;
}

.offline-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 10px rgba(176, 38, 255, 0.5));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.offline-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.4rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.offline-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.offline-status-text {
    font-size: 0.75rem;
    color: var(--neon-purple);
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.8;
    display: inline-block;
    padding: 0.4rem 1rem;
    border: 1px solid rgba(176, 38, 255, 0.3);
    border-radius: 4px;
    background: rgba(176, 38, 255, 0.05);
}