/* Halicon Meet Custom Modern Theme & Glassmorphism */
:root {
    --brand-pub-primary: #1E3A8A;
    --brand-pub-accent: #0D9488;
    --brand-soft-primary: #4F46E5;
    --brand-soft-accent: #9333EA;
}

/* Glassmorphism styling */
.glass-panel {
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-card {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-card-hover {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.glass-card-hover:hover {
    transform: translateY(-2px);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 12px 30px -10px rgba(79, 70, 229, 0.25);
}

/* Custom scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.6);
}
::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.25);
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.4);
}

/* Video Grid Layouts */
.video-grid {
    display: grid;
    gap: 12px;
    width: 100%;
    height: 100%;
    padding: 12px;
    align-content: center;
    justify-content: center;
}

.video-grid-1 { grid-template-columns: minmax(0, 1fr); max-width: 1200px; max-height: 85vh; margin: auto; }
.video-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.video-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.video-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); }
.video-grid-5, .video-grid-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); }
.video-grid-many { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

/* Video Tile */
.video-tile {
    position: relative;
    background: #0f172a;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 9;
    transition: all 0.2s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

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

.video-tile.speaking {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.4), 0 8px 24px rgba(0, 0, 0, 0.6);
}

/* Floating Reactions */
.reaction-particle {
    position: absolute;
    pointer-events: none;
    font-size: 2.2rem;
    animation: floatUp 2.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    z-index: 50;
}

@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translateY(0) scale(0.6) rotate(0deg);
    }
    50% {
        opacity: 0.9;
        transform: translateY(-80px) scale(1.2) rotate(10deg);
    }
    100% {
        opacity: 0;
        transform: translateY(-160px) scale(1.4) rotate(-15deg);
    }
}

/* Audio VU Meter */
.vu-meter-bar {
    transition: height 0.05s ease-out;
}

/* Whiteboard Canvas */
#whiteboardCanvas {
    cursor: crosshair;
    background: #ffffff;
    border-radius: 12px;
    touch-action: none;
}

/* Pulse animation for live badges */
@keyframes customPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.96); }
}
.pulse-badge {
    animation: customPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Mobile Responsive Optimizations */
@media (max-width: 768px) {
    .video-grid {
        padding: 6px;
        gap: 8px;
        align-content: stretch;
    }
    .video-grid-1 {
        max-width: 100%;
        max-height: 100%;
        height: 100%;
    }
    .video-grid-1 .video-tile {
        aspect-ratio: auto;
        width: 100%;
        height: 100%;
        border-radius: 18px;
    }
    .video-grid-2 {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 1fr;
        height: 100%;
    }
    .video-grid-2 .video-tile {
        aspect-ratio: auto;
        width: 100%;
        height: 100%;
        border-radius: 14px;
    }
    .video-tile {
        aspect-ratio: 4 / 3;
    }
    footer.h-20 {
        height: 4.5rem;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    footer button {
        width: 2.75rem !important;
        height: 2.75rem !important;
        border-radius: 0.875rem !important;
    }
}
