/* Psyche Duets CSS — Glassmorphic Premium Design */

:root {
    --sidebar-width: 320px;
    --action-bar-height: 80px;
    --glass-bg: rgba(15, 23, 42, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --accent-glow: 0 0 20px rgba(6, 182, 212, 0.3);
}

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

body {
    font-family: 'Inter', sans-serif;
    background: #020617;
    color: #f8fafc;
    overflow: hidden;
    height: 100vh;
}

.duets-layout {
    display: flex;
    width: 100vw;
    height: 100vh;
}

/* Sidebar */
.duets-sidebar {
    width: var(--sidebar-width);
    background: var(--surface-1);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
}

.duets-sidebar.collapsed {
    transform: translateX(-100%);
    position: absolute;
}

.sidebar-header {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #06b6d4, #a855f7);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.logo-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
}

.logo-text span {
    color: #06b6d4;
}

.sidebar-tabs {
    display: flex;
    padding: 0 1rem;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tab-btn {
    flex: 1;
    padding: 0.6rem;
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.tab-btn.active {
    color: #06b6d4;
    border-bottom-color: #06b6d4;
}

.tab-content {
    display: none;
    flex: 1;
    flex-direction: column;
    overflow: hidden;
}

.tab-content.active {
    display: flex;
}

/* Chat */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.system-msg {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem;
    border-radius: 8px;
}

.chat-input-area {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.5rem;
}

#chatInput {
    flex: 1;
    background: var(--surface-2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.6rem;
    color: white;
    font-size: 0.9rem;
}

#sendMsg {
    background: #06b6d4;
    border: none;
    color: white;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    cursor: pointer;
}

/* Main Content */
.duets-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    background: radial-gradient(circle at 50% 50%, #0f172a 0%, #020617 100%);
}

.duets-nav {
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(2, 6, 23, 0.4);
    backdrop-filter: blur(10px);
    z-index: 10;
}

.room-details h1 {
    font-size: 1rem;
    font-weight: 600;
}

.room-count {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.timer-display {
    font-family: var(--font-mono);
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-weight: 700;
}

/* Video Grid */
.video-grid-container {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-grid {
    display: grid;
    gap: 1.25rem;
    width: 100%;
    max-width: 1400px;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.video-card {
    aspect-ratio: 4/3;
    background: var(--surface-1);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    transition: transform 0.3s;
}

.video-card:hover {
    transform: scale(1.02);
}

.video-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

.focus-overlay {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.focus-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    color: var(--text-tertiary);
}

.focus-value {
    font-weight: 700;
    color: #06b6d4;
    font-size: 0.9rem;
}

.user-meta {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.4rem 0.8rem;
    background: rgba(0,0,0,0.5);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.user-name {
    font-size: 0.8rem;
    font-weight: 600;
}

/* Action Bar */
.action-bar {
    height: var(--action-bar-height);
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    position: relative;
}

.action-group {
    display: flex;
    gap: 1rem;
}

.action-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.action-btn.active {
    background: #06b6d4;
    border-color: #06b6d4;
    box-shadow: var(--accent-glow);
}

.action-btn.danger {
    background: #ef4444;
}

/* Pickers */
.picker-popup {
    position: absolute;
    bottom: 90px;
    background: var(--surface-1);
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: 12px;
    display: flex;
    gap: 0.5rem;
    box-shadow: var(--shadow-xl);
    z-index: 1000;
}

.emoji-list, .filter-list {
    display: flex;
    gap: 0.5rem;
}

.emoji-item {
    font-size: 1.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
}

.emoji-item:hover {
    background: rgba(255,255,255,0.05);
}

.filter-item {
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.75rem;
    cursor: pointer;
}

.filter-item.active {
    background: #06b6d4;
    color: white;
    border-color: #06b6d4;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .duets-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        transform: translateX(-100%);
    }
    
    .duets-sidebar.active {
        transform: translateX(0);
    }
    
    .video-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 0.75rem;
    }
    
    .action-bar {
        padding: 0 1rem;
        height: 70px;
    }
    
    .action-btn {
        width: 40px;
        height: 40px;
    }
}

/* Reactions */
.reaction-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 50;
    overflow: hidden;
}

.reaction-burst {
    position: absolute;
    font-size: 2rem;
    animation: burstUp 2s ease-out forwards;
}

@keyframes burstUp {
    0% { transform: scale(0.5) translateY(0); opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { transform: scale(1.5) translateY(-200px); opacity: 0; }
}

.spin {
    animation: spin 2s linear infinite;
}

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