/* ===== VIMEDIA TEAMLIVE - White Theme ===== */
:root {
    --primary: #4A2FBD;
    --primary-dark: #3A1FA8;
    --primary-light: #6B52D6;
    --primary-soft: #EDE9FB;
    --accent: #00C9A7;
    --accent-dark: #00A88A;
    --accent-soft: #E0F9F3;
    --bg: #FFFFFF;
    --bg-soft: #F7F6FB;
    --bg-card: #FFFFFF;
    --bg-card-hover: #F9F8FE;
    --bg-input: #F3F2F8;
    --text: #1A1A2E;
    --text-secondary: #5C5C7A;
    --text-muted: #9494AC;
    --text-light: #FFFFFF;
    --border: #E5E4EF;
    --border-light: #F0EFF5;
    --success: #00C9A7;
    --warning: #FFB545;
    --danger: #FF5C5C;
    --shadow-sm: 0 1px 3px rgba(74,47,189,0.06);
    --shadow: 0 4px 16px rgba(74,47,189,0.08);
    --shadow-lg: 0 8px 32px rgba(74,47,189,0.12);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
}

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

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-soft);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    text-decoration: none;
    line-height: 1.4;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(74,47,189,0.25);
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(74,47,189,0.3); }

.btn-accent {
    background: var(--accent);
    color: white;
    box-shadow: 0 2px 8px rgba(0,201,167,0.25);
}
.btn-accent:hover { background: var(--accent-dark); transform: translateY(-1px); }

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 2px solid var(--border);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { opacity: 0.9; }

.btn-success { background: var(--success); color: white; }

.btn-sm { padding: 8px 16px; font-size: 13px; border-radius: var(--radius-xs); }
.btn-lg { padding: 16px 32px; font-size: 17px; border-radius: var(--radius); }
.btn-block { width: 100%; }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: 50%; }

/* ===== INPUTS ===== */
.input, .textarea, .select {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 15px;
    transition: all 0.2s;
}
.input:focus, .textarea:focus, .select:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px var(--primary-soft);
}
.textarea { resize: vertical; min-height: 80px; }

.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== CARDS ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s;
}
.card:hover { box-shadow: var(--shadow); }
.card-header { margin-bottom: 16px; }
.card-title { font-size: 18px; font-weight: 700; color: var(--text); }

/* ===== NAVBAR ===== */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 32px;
    background: white;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
    text-decoration: none;
}

.navbar-brand .logo-icon {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    font-weight: 800;
}

.navbar-brand .brand-vi { color: var(--primary); }
.navbar-brand .brand-live { color: var(--accent); }

.navbar-links { display: flex; gap: 20px; align-items: center; }
.navbar-links a { color: var(--text-secondary); font-weight: 500; font-size: 14px; }
.navbar-links a:hover { color: var(--primary); }

/* ===== HERO ===== */
.hero {
    text-align: center;
    padding: 80px 32px 60px;
    max-width: 760px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    background: var(--primary-soft);
    color: var(--primary);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
}

.hero h1 {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 18px;
    color: var(--text);
}

.hero h1 .highlight {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 36px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ===== FEATURES ===== */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    padding: 20px 32px 80px;
    max-width: 1100px;
    margin: 0 auto;
}

.feature-card { text-align: center; padding: 32px 20px; }

.feature-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.feature-icon.purple { background: var(--primary-soft); }
.feature-icon.green { background: var(--accent-soft); }
.feature-icon.blue { background: #E8F4FD; }
.feature-icon.orange { background: #FFF3E0; }

.feature-card h3 { font-size: 17px; margin-bottom: 6px; color: var(--text); }
.feature-card p { color: var(--text-muted); font-size: 14px; }

/* ===== FOOTER ===== */
.footer {
    text-align: center;
    padding: 28px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 13px;
    background: white;
}

/* ===== JOIN PAGE ===== */
.join-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 60px);
    padding: 32px;
}

.join-card {
    max-width: 420px;
    width: 100%;
    text-align: center;
}

.join-card h2 { font-size: 26px; margin-bottom: 6px; }

.join-card .room-name {
    color: var(--primary);
    font-size: 15px;
    margin-bottom: 28px;
}

.join-card .avatar-placeholder {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--primary);
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    font-weight: 700;
}

/* ===== WAITING ROOM (LOBBY) ===== */
.waiting-room {
    text-align: center;
    padding: 40px 20px;
}

.waiting-room .spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.waiting-room h3 { font-size: 20px; margin-bottom: 8px; color: var(--text); }
.waiting-room p { color: var(--text-muted); font-size: 14px; }

/* ===== STATUS BADGES ===== */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-active { background: var(--accent-soft); color: var(--accent-dark); }
.badge-waiting { background: #FFF3E0; color: #E68A00; }
.badge-ended { background: #FFE8E8; color: var(--danger); }
.badge-pending { background: var(--primary-soft); color: var(--primary); }

/* ===== TOAST ===== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    color: white;
    font-weight: 500;
    animation: slideIn 0.3s ease;
    min-width: 280px;
    box-shadow: var(--shadow-lg);
}

.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
.toast-info { background: var(--primary); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(26,26,46,0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
}
.modal-overlay.active { opacity: 1; visibility: visible; }

.modal {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}
.modal h3 { font-size: 22px; margin-bottom: 20px; color: var(--text); }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; }

/* ===== LOBBY PENDING LIST ===== */
.lobby-list { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }

.lobby-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-soft);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.lobby-item .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.lobby-item .name { flex: 1; font-weight: 600; font-size: 15px; }
.lobby-item .time { color: var(--text-muted); font-size: 12px; }

.lobby-actions { display: flex; gap: 6px; }

/* ===== UTILITIES ===== */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; }
.hidden { display: none !important; }

@media (max-width: 768px) {
    .hero h1 { font-size: 30px; }
    .hero p { font-size: 15px; }
    .navbar { padding: 10px 16px; }
    .features { padding: 16px 16px 40px; }
    .hero { padding: 50px 16px 30px; }
}
