@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-main: #0b0f19;
    --bg-card: rgba(22, 28, 45, 0.75);
    --bg-card-hover: rgba(30, 39, 61, 0.85);
    --bg-bar: rgba(15, 20, 35, 0.92);
    --zoom-blue: #0E71EB;
    --zoom-blue-hover: #1e80f8;
    --zoom-blue-glow: rgba(14, 113, 235, 0.35);
    --zoom-red: #f24e1e;
    --zoom-red-hover: #ff6030;
    --zoom-green: #10B981;
    --zoom-orange: #F59E0B;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.12);
    --font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --sidebar-width: 380px;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    background-image: 
        radial-gradient(at 10% 20%, rgba(14, 113, 235, 0.15) 0px, transparent 50%),
        radial-gradient(at 90% 80%, rgba(139, 92, 246, 0.12) 0px, transparent 50%);
    background-attachment: fixed;
}

/* Glassmorphism & Cards */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-panel:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

/* Navigation Header */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 40px;
    background: rgba(11, 15, 25, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.6rem;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.navbar .logo span {
    color: var(--zoom-blue);
    background: linear-gradient(135deg, #38bdf8, var(--zoom-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.navbar .nav-links {
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--text-primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    font-family: var(--font-family);
    cursor: pointer;
    border: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--zoom-blue), #2563eb);
    color: #ffffff;
    box-shadow: 0 4px 14px var(--zoom-blue-glow);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--zoom-blue-hover), #3b82f6);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--zoom-blue-glow);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, var(--zoom-red), #dc2626);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(242, 78, 30, 0.3);
}

.btn-danger:hover {
    background: linear-gradient(135deg, var(--zoom-red-hover), #ef4444);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, var(--zoom-green), #059669);
    color: #ffffff;
}

/* Hero Section */
.hero {
    max-width: 1280px;
    margin: 60px auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 24px;
    background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 36px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-card {
    padding: 36px;
    position: relative;
    overflow: hidden;
}

.hero-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(14, 113, 235, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    background: rgba(15, 20, 35, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: var(--font-family);
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--zoom-blue);
    box-shadow: 0 0 0 3px rgba(14, 113, 235, 0.2);
}

/* Dashboard Action Grid (Zoom Style) */
.action-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.action-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    border-radius: 20px;
    text-decoration: none;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.action-tile:hover {
    transform: translateY(-6px) scale(1.02);
}

.action-tile .icon-box {
    width: 68px;
    height: 68px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.tile-orange .icon-box { background: linear-gradient(135deg, #f97316, #ea580c); }
.tile-blue .icon-box { background: linear-gradient(135deg, #38bdf8, #0284c7); }
.tile-purple .icon-box { background: linear-gradient(135deg, #a855f7, #7e22ce); }
.tile-green .icon-box { background: linear-gradient(135deg, #34d399, #059669); }

.action-tile span {
    font-weight: 600;
    font-size: 1.05rem;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.tab-btn {
    padding: 12px 24px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: var(--zoom-blue);
    border-bottom-color: var(--zoom-blue);
}

/* Meeting Room Container */
.meeting-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    background: #000000;
    position: relative;
}

.main-stage {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    height: 100%;
}

.video-grid {
    flex: 1;
    display: grid;
    gap: 12px;
    padding: 16px;
    padding-bottom: 90px;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    align-content: center;
    justify-content: center;
    max-height: 100vh;
    overflow-y: auto;
}

.video-tile {
    background: #11141d;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 16 / 9;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    border: 2px solid transparent;
    transition: border-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-tile.speaking {
    border-color: #10B981;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

.video-tile video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-tile .user-info-tag {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 5;
}

.video-tile .avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--zoom-blue), #6366f1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: white;
}

.video-tile .hand-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(245, 158, 11, 0.9);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 1.1rem;
    animation: bounce 1s infinite alternate;
    z-index: 5;
}

/* Control Bar (Glassmorphic Bottom Dock) */
.control-bar {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-bar);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    padding: 10px 24px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6);
    z-index: 50;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.control-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px 14px;
    border-radius: 12px;
    transition: all 0.2s ease;
    min-width: 64px;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.control-btn.active-red {
    color: var(--zoom-red);
}

.control-btn .icon {
    font-size: 1.3rem;
    margin-bottom: 4px;
}

.control-btn .label {
    font-size: 0.75rem;
    font-weight: 500;
}

.control-btn .badge {
    background: var(--zoom-blue);
    color: white;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 10px;
    position: absolute;
    top: 4px;
    right: 8px;
}

.btn-end {
    background: var(--zoom-red);
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-end:hover {
    background: var(--zoom-red-hover);
    box-shadow: 0 4px 16px rgba(242, 78, 30, 0.5);
}

/* Sidebars (Chat, Participants, Whiteboard) */
.sidebar {
    width: var(--sidebar-width);
    background: #111522;
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    transition: width 0.3s ease, transform 0.3s ease;
    z-index: 40;
}

.sidebar.hidden {
    width: 0;
    overflow: hidden;
    border-left: none;
}

.sidebar-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.sidebar-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.4rem;
    cursor: pointer;
}

.sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

/* Chat Messages */
.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.chat-bubble {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 0.9rem;
}

.chat-bubble .sender {
    font-weight: 600;
    color: #38bdf8;
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
}

.chat-bubble .time {
    color: var(--text-muted);
    font-weight: 400;
}

.chat-input-area {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    background: #0f131f;
}

/* Reaction Floating Animations */
.floating-reaction {
    position: absolute;
    bottom: 90px;
    font-size: 2.5rem;
    pointer-events: none;
    animation: floatUpAndFade 3s ease-out forwards;
    z-index: 60;
}

@keyframes floatUpAndFade {
    0% {
        transform: translateY(0) scale(0.5);
        opacity: 1;
    }
    50% {
        transform: translateY(-200px) scale(1.3);
        opacity: 0.9;
    }
    100% {
        transform: translateY(-450px) scale(1.5);
        opacity: 0;
    }
}

@keyframes bounce {
    0% { transform: translateY(0); }
    100% { transform: translateY(-5px); }
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-box {
    background: #161c2d;
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 32px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    transform: scale(0.95);
    transition: transform 0.25s ease;
}

.modal-overlay.active .modal-box {
    transform: scale(1);
}

/* Responsive */
@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .action-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .navbar {
        padding: 14px 20px;
    }
}
