/* FragForge Styles */
:root {
    --accent-purple: #7871ff;
    --bg-primary: #0e0e10;
    --bg-secondary: #18181b;
    --bg-elevated: #1f1f23;
    --text-primary: #efeff1;
    --text-secondary: #adadb8;
    --text-muted: #53535f;
    --border-color: #2d2d35;
    --hover-bg: #26262c;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Main Layout - Desktop */
.stream-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    grid-template-rows: auto 1fr;
    min-height: 100vh;
    max-width: 1920px;
    margin: 0 auto;
}

.video-container {
    grid-column: 1;
    grid-row: 1;
}

.chat-container {
    grid-column: 2;
    grid-row: 1 / 3;
}

.info-section {
    grid-column: 1;
    grid-row: 2;
}

/* Video Container */
.video-container {
    position: relative;
    background-color: #000;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
}

.stream-player,
.offline-banner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.stream-player iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Offline Banner */
.offline-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.offline-content {
    text-align: center;
    padding: 2rem;
}

.stream-logo {
    max-width: 200px;
    height: auto;
    margin-bottom: 1.5rem;
    border-radius: 12px;
}

.offline-message {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.notify-btn {
    background-color: var(--accent-purple);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.notify-btn:hover {
    background-color: #6863e6;
}

.last-live {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Info Section */
.info-section {
    padding: 2rem;
    background-color: var(--bg-secondary);
}

.stream-header {
    margin-bottom: 1.5rem;
}

.logo-title {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.title-logo {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    flex-shrink: 0;
}

.title-area {
    flex: 1;
}

.stream-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.stream-tagline {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.tag {
    background-color: var(--bg-elevated);
    color: var(--accent-purple);
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* About Content */
.about-content {
    color: var(--text-primary);
}

.about-content h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.about-content h3 {
    font-size: 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.about-content p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.about-content ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.about-content li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.about-content strong {
    color: var(--text-primary);
}

/* Chat Container */
.chat-container {
    background-color: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
}

.chat-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-elevated);
    flex-shrink: 0;
}

.chat-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

.viewer-count {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.chat-messages {
    flex: 1;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Minnit Chat Specific Styles - FORCE FULL SIZE */
.chat-messages .minnit-chat-sembed {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    flex: 1;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
}

.chat-messages iframe {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    border: none !important;
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
}

/* Override ANY inline styles from Minnit */
.chat-messages > div,
.chat-messages > span {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    flex: 1;
}

/* Target Minnit's dynamically created elements */
.chat-messages * {
    max-width: 100% !important;
    max-height: none !important;
}

/* Responsive Design - Mobile/Tablet Reordering */
@media (max-width: 1024px) {
    .stream-layout {
        display: flex;
        flex-direction: column;
    }

    .video-container {
        order: 1;
    }

    .chat-container {
        order: 2;
        border-left: none;
        border-top: 1px solid var(--border-color);
        border-bottom: 1px solid var(--border-color);
        height: 500px;
        position: relative;
    }

    .info-section {
        order: 3;
    }
}

@media (max-width: 768px) {
    .info-section {
        padding: 1rem;
    }

    .logo-title {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .stream-title {
        font-size: 1.25rem;
    }

    .about-content h2 {
        font-size: 1.25rem;
    }

    .about-content h3 {
        font-size: 1.125rem;
    }

    .chat-container {
        height: 450px;
    }
}

@media (max-width: 480px) {
    .chat-container {
        height: 400px;
    }
}

