/* Base structural styling */
body, html {
    margin: 0;
    padding: 0;
    font-family: 'Nunito', 'Comic Sans MS', sans-serif;
    background-color: var(--bg-body, #f5fdf7);
    color: var(--text-main, #333);
    transition: background-color 0.3s ease, color 0.3s ease;
}

#app-root, #login-root {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.dashboard-layout {
    display: flex;
    gap: 30px;
}

@media (max-width: 800px) {
    .dashboard-layout {
        flex-direction: column;
    }
}

.video-section {
    flex: 2;
}

.chat-section {
    flex: 1;
    background: var(--bg-panel, #ffffff);
    border-radius: 24px;
    padding: 20px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease;
}

video {
    width: 100%;
    border-radius: 24px;
    background: #000;
}

/* Header layout */
.app-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    gap: 10px;
}

.header-top-row {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
}

.header-title {
    margin: 0;
    font-size: 3rem;
}

.theme-selector {
    padding: 10px;
    font-size: 1rem;
    border-radius: 16px;
    border: 2px solid var(--input-border, #ccc);
    cursor: pointer;
}

.welcome-text {
    margin: 0;
    font-size: 1.2rem;
}

.header-buttons {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 0;
    display: flex;
    gap: 10px;
}

.header-btn {
    text-decoration: none;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-btn .btn-icon {
    display: none;
}

/* Mobile Portrait Header Adjustments */
@media (max-width: 600px) {
    .header-title {
        font-size: 1.8rem;
    }

    .header-buttons {
        gap: 5px;
    }

    .header-btn .btn-text {
        display: none;
    }
    
    .header-btn .btn-icon {
        display: inline-block;
        font-size: 1.2rem;
    }
    
    /* Stronger selector to override .btn-chunky in kid_theme.css */
    .app-header .header-btn {
        padding: 5px 10px;
    }
}
