.twitch-stream-section {
    width: 100%;
    margin: 60px 0;
    overflow: hidden;
}

.twitch-bar {
    background: linear-gradient(135deg, #9146FF 0%, #772CE8 100%);
    padding: 20px 40px;
    box-shadow: 0 4px 20px rgba(145, 70, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.twitch-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.1),
            transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

.twitch-bar-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    position: relative;
    z-index: 1;
}

.twitch-logo {
    color: white;
    display: flex;
    align-items: center;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.twitch-title {
    font-family: 'Rajdhani', sans-serif;
    color: white;
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.watch-button {
    background: white;
    color: #9146FF;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.watch-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background: #f0f0f0;
}

.watch-button:active {
    transform: translateY(0);
}

.button-icon {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.watch-button:hover .button-icon {
    transform: scale(1.2);
}

.stream-container {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    background: #18181b;
}

.stream-container.expanded {
    max-height: calc(100vw * 0.5625 + 80px); /* 16:9 ratio + padding */
}

.tv-frame {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
}

.tv-screen {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow:
        0 0 0 8px #2d2d2d,
        0 0 0 12px #1a1a1a,
        0 20px 60px rgba(0, 0, 0, 0.8),
        inset 0 0 20px rgba(145, 70, 255, 0.2);
    animation: tvExpand 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: top center;
}

@keyframes tvExpand {
    0% {
        transform: scaleY(0.05) scaleX(0.9);
        opacity: 0;
    }

    50% {
        transform: scaleY(0.5) scaleX(0.95);
        opacity: 0.7;
    }

    100% {
        transform: scaleY(1) scaleX(1);
        opacity: 1;
    }
}

.tv-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg,
            rgba(145, 70, 255, 0.1) 0%,
            transparent 20%,
            transparent 80%,
            rgba(145, 70, 255, 0.1) 100%);
    pointer-events: none;
    z-index: 1;
}

.tv-screen iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

@media (max-width: 768px) {
    .twitch-bar {
        padding: 15px 20px;
    }

    .twitch-bar-content {
        flex-wrap: wrap;
        gap: 15px;
    }

    .twitch-title {
        font-size: 20px;
    }

    .watch-button {
        padding: 10px 25px;
        font-size: 14px;
    }

    .tv-frame {
        padding: 20px 10px;
    }

    .stream-container.expanded {
        max-height: calc(100vw * 0.5625 + 40px);
    }
}