/**
 * OddSockets Video Calls Tutorial - Anthropic-Inspired Minimal Styles
 * 
 * Clean, minimal styles for the video calls tutorial application.
 * Uses CSS custom properties for consistent theming.
 */

/* CSS Custom Properties for Clean, Minimal Theme */
:root {
    /* Anthropic-inspired neutral palette */
    --primary-bg: #ffffff;
    --secondary-bg: #fafafa;
    --tertiary-bg: #f5f5f5;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-muted: #999999;
    --border-color: #e5e5e5;
    --border-light: #f0f0f0;
    --border-medium: #d0d0d0;
    --border-hover: #b0b0b0;
    --hover-bg: #f8f8f8;
    --focus-ring: rgba(26, 26, 26, 0.1);
    
    /* Minimal accent colors - muted and professional */
    --accent-primary: #2d2d2d;
    --accent-success: #4a5d23;
    --accent-warning: #8b6914;
    --accent-danger: #7a2e2e;
    --accent-info: #2d4a5d;
    
    /* Subtle shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
    --shadow-md: 0 2px 4px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 4px 8px 0 rgba(0, 0, 0, 0.08);
    
    /* Spacing system */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    
    /* Border radius - minimal */
    --border-radius-sm: 0.125rem;
    --border-radius: 0.25rem;
    --border-radius-lg: 0.375rem;
    
    /* Typography */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    
    --transition: all 0.15s ease;
}

/* Dark theme - subtle and professional */
.theme-dark {
    --primary-bg: #0f0f0f;
    --secondary-bg: #1a1a1a;
    --tertiary-bg: #262626;
    --text-primary: #f0f0f0;
    --text-secondary: #b0b0b0;
    --text-muted: #808080;
    --border-color: #333333;
    --border-light: #262626;
    --border-medium: #404040;
    --border-hover: #666666;
    --hover-bg: #1f1f1f;
    --focus-ring: rgba(240, 240, 240, 0.1);
    
    --accent-primary: #e0e0e0;
    --accent-success: #7a9b3a;
    --accent-warning: #b8941f;
    --accent-danger: #a64444;
    --accent-info: #4a6b85;
}

/* Base styles */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--secondary-bg);
    margin: 0;
    padding: 0;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-4);
}

/* Navigation Styles */
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    height: 32px;
    width: auto;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

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

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

/* Responsive Navigation */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
}

/* Tutorial Header */
.tutorial-header {
    background: var(--primary-bg);
    border-bottom: 1px solid var(--border-color);
    padding: var(--space-6) 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-8);
}

.tutorial-info h1 {
    margin: 0 0 var(--space-1) 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.tutorial-info p {
    margin: 0;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.tutorial-actions {
    display: flex;
    gap: var(--space-3);
}

/* Buttons - Clean and minimal */
.btn {
    display: inline-flex;
    align-items: center;
    padding: var(--space-2) var(--space-4);
    border: 1px solid transparent;
    border-radius: var(--border-radius);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    gap: var(--space-2);
    font-family: var(--font-family);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--accent-primary);
    color: var(--primary-bg);
    border-color: var(--accent-primary);
}

.btn-primary:hover:not(:disabled) {
    background: var(--text-primary);
    border-color: var(--text-primary);
    color: var(--primary-bg);
}

.btn-success {
    background: var(--accent-success);
    color: var(--primary-bg);
    border-color: var(--accent-success);
}

.btn-success:hover:not(:disabled) {
    opacity: 0.9;
    color: var(--primary-bg);
}

.btn-secondary {
    background: var(--tertiary-bg);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--hover-bg);
    border-color: var(--border-medium);
    color: var(--text-primary);
}

.btn-outline {
    background: transparent;
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.btn-outline:hover {
    background: var(--accent-primary);
    color: var(--primary-bg);
}

.btn-ghost {
    background: transparent;
    border: none;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
}

.btn-sm {
    padding: var(--space-1) var(--space-3);
    font-size: 11px;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* API Key Setup Section */
.setup-section {
    padding: var(--space-8) 0;
    background: var(--secondary-bg);
}

.setup-card {
    background: var(--primary-bg);
    border-radius: var(--border-radius);
    padding: var(--space-8);
    box-shadow: var(--shadow-md);
    max-width: 800px;
    margin: 0 auto;
    border: 1px solid var(--border-color);
}

.setup-header {
    text-align: center;
    margin-bottom: var(--space-8);
}

.setup-header i {
    font-size: 2rem;
    color: var(--accent-primary);
    margin-bottom: var(--space-4);
}

.setup-header h2 {
    margin: 0 0 var(--space-2) 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.setup-header p {
    margin: 0;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.setup-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-8);
}

.option-card {
    background: var(--secondary-bg);
    border-radius: var(--border-radius);
    padding: var(--space-6);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.option-card:hover {
    border-color: var(--border-medium);
    box-shadow: var(--shadow-sm);
}

.option-card h3 {
    margin: 0 0 var(--space-2) 0;
    font-size: 1rem;
    font-weight: 600;
}

.option-card p {
    margin: 0 0 var(--space-4) 0;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    line-height: 1.4;
}

.api-key-input {
    display: flex;
    gap: var(--space-2);
    margin-top: var(--space-4);
}

.api-key-input input {
    flex: 1;
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: var(--font-size-sm);
    background: var(--primary-bg);
    color: var(--text-primary);
    font-family: var(--font-family);
}

.api-key-input input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px var(--focus-ring);
}

.demo-option {
    text-align: center;
    padding-top: var(--space-6);
    border-top: 1px solid var(--border-light);
}

.demo-option small {
    display: block;
    margin-top: var(--space-2);
    color: var(--text-muted);
    font-size: 11px;
}

/* Video Container */
.video-container {
    background: var(--primary-bg);
    min-height: calc(100vh - 120px);
}

.connection-status {
    background: var(--secondary-bg);
    border-bottom: 1px solid var(--border-color);
    padding: var(--space-3) 0;
    text-align: center;
    font-size: var(--font-size-sm);
}

.connection-status.connected {
    background: rgba(74, 93, 35, 0.1);
    color: var(--accent-success);
}

.connection-status.connecting {
    background: rgba(139, 105, 20, 0.1);
    color: var(--accent-warning);
}

.connection-status.disconnected {
    background: rgba(122, 46, 46, 0.1);
    color: var(--accent-danger);
}

.connection-status.demo {
    background: rgba(45, 74, 93, 0.1);
    color: var(--accent-info);
}

.status-indicator {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: var(--space-2);
    background: var(--text-muted);
}

.status-indicator.connected {
    background: var(--accent-success);
}

.status-indicator.connecting {
    background: var(--accent-warning);
    animation: pulse 1.5s infinite;
}

.status-indicator.disconnected {
    background: var(--accent-danger);
}

.status-indicator.demo {
    background: var(--accent-info);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Video Interface */
.video-interface {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    max-height: 800px;
}

.video-header {
    background: var(--primary-bg);
    border-bottom: 1px solid var(--border-light);
    padding: var(--space-4);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.call-info h2 {
    margin: 0 0 var(--space-1) 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.call-info p {
    margin: 0;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.call-stats {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.stat {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

/* Video Grid Container */
.video-grid-container {
    flex: 1;
    overflow: hidden;
    background: var(--secondary-bg);
    padding: var(--space-4);
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-4);
    height: 100%;
    align-items: center;
}

.video-item {
    position: relative;
    background: var(--tertiary-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    aspect-ratio: 16/9;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.video-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: var(--tertiary-bg);
}

.video-item.local-video video {
    transform: scaleX(-1); /* Mirror local video */
}

.video-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    padding: var(--space-3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.participant-name {
    font-size: var(--font-size-sm);
    font-weight: 500;
}

.video-controls {
    display: flex;
    gap: var(--space-2);
}

.control-indicator {
    background: rgba(0, 0, 0, 0.6);
    border-radius: var(--border-radius-sm);
    padding: var(--space-1);
    font-size: 0.75rem;
}

.control-indicator.muted {
    color: var(--accent-danger);
}

.control-indicator.video-off {
    color: var(--accent-warning);
}

/* Welcome Message */
.welcome-message {
    text-align: center;
    padding: var(--space-8);
    background: var(--primary-bg);
    border-radius: var(--border-radius);
    margin: var(--space-4);
    border: 1px solid var(--border-color);
}

.welcome-content i {
    font-size: 1.5rem;
    color: var(--accent-primary);
    margin-bottom: var(--space-4);
}

.welcome-content h3 {
    margin: 0 0 var(--space-2) 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.welcome-content p {
    margin: 0 0 var(--space-4) 0;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.welcome-content ul {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-6) 0;
    text-align: left;
    display: inline-block;
}

.welcome-content li {
    margin-bottom: var(--space-2);
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    line-height: 1.4;
}

/* Call Controls */
.call-controls {
    background: var(--primary-bg);
    border-top: 1px solid var(--border-light);
    padding: var(--space-4);
    display: flex;
    justify-content: center;
    gap: var(--space-6);
}

.control-group {
    display: flex;
    gap: var(--space-2);
    align-items: center;
}

/* Media control buttons (mute, video, screen share) keep circular style */
.call-controls .btn-secondary {
    min-width: 44px;
    height: 44px;
    border-radius: 50%;
    padding: 0;
    justify-content: center;
}

/* Join/Leave and Chat/Settings buttons use standard Anthropic button styling */
.call-controls .btn-success,
.call-controls .btn-danger,
.call-controls .btn-outline {
    min-width: auto;
    height: auto;
    border-radius: var(--border-radius);
    padding: var(--space-2) var(--space-4);
    font-size: 13px;
}

/* Chat Panel */
.chat-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: var(--primary-bg);
    border-left: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    transition: right 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.chat-panel.open {
    right: 0;
}

.chat-header {
    background: var(--accent-primary);
    color: var(--primary-bg);
    padding: var(--space-4);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-4);
    background: var(--secondary-bg);
}

.chat-message {
    margin-bottom: var(--space-4);
    opacity: 0;
    animation: fadeInUp 0.3s ease-out forwards;
}

.chat-message.own {
    text-align: right;
}

.chat-message.own .message-header,
.chat-message.own .message-text {
    background: #007bff;
    color: var(--primary-bg);
}

.system-message {
    text-align: center;
    margin-bottom: var(--space-3);
    opacity: 0;
    animation: fadeInUp 0.3s ease-out forwards;
}

.system-message .message-icon {
    margin-right: var(--space-2);
}

.system-message .message-text {
    background: var(--tertiary-bg);
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--border-radius);
    display: inline-block;
}

.message-header {
    background: var(--primary-bg);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    font-size: var(--font-size-sm);
    font-weight: 600;
    border: 1px solid var(--border-color);
    border-bottom: none;
}

.message-text {
    background: var(--primary-bg);
    padding: var(--space-2) var(--space-3);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    font-size: var(--font-size-sm);
    line-height: 1.4;
    border: 1px solid var(--border-color);
    border-top: none;
}

.message-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: var(--space-1);
}

.chat-form {
    background: var(--primary-bg);
    border-top: 1px solid var(--border-light);
    padding: var(--space-4);
}

.chat-form .input-group {
    display: flex;
    gap: var(--space-2);
}

.chat-form input {
    flex: 1;
    padding: var(--space-3);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: var(--font-size-base);
    background: var(--primary-bg);
    color: var(--text-primary);
    font-family: var(--font-family);
}

.chat-form input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px var(--focus-ring);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tutorial Sidebar */
.tutorial-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: var(--primary-bg);
    border-left: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    transition: right 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
}

.tutorial-sidebar.open {
    right: 0;
}

.sidebar-header {
    background: var(--accent-primary);
    color: var(--primary-bg);
    padding: var(--space-4);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.sidebar-content {
    padding: var(--space-4);
}

.tutorial-step {
    background: var(--secondary-bg);
    border-radius: var(--border-radius);
    padding: var(--space-4);
    margin-bottom: var(--space-4);
    border-left: 3px solid var(--border-color);
    transition: var(--transition);
}

.tutorial-step.active {
    border-left-color: var(--accent-primary);
    background: rgba(45, 45, 45, 0.05);
}

.tutorial-step.completed {
    border-left-color: var(--accent-success);
    background: rgba(74, 93, 35, 0.05);
}

.tutorial-step h4 {
    margin: 0 0 var(--space-2) 0;
    font-size: 0.9rem;
    font-weight: 600;
}

.tutorial-step p {
    margin: 0 0 var(--space-3) 0;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    line-height: 1.4;
}

.code-preview {
    background: var(--tertiary-bg);
    border-radius: var(--border-radius-sm);
    padding: var(--space-3);
    margin-top: var(--space-2);
    border: 1px solid var(--border-color);
}

.code-preview pre {
    margin: 0;
    font-size: 11px;
    line-height: 1.4;
    overflow-x: auto;
    font-family: var(--font-mono);
    color: var(--text-primary);
}

.step-actions {
    margin-top: var(--space-2);
}

.sidebar-footer {
    padding: var(--space-4);
    border-top: 1px solid var(--border-light);
}

/* Tutorial Toggle Button */
.tutorial-toggle {
    position: fixed;
    top: 50%;
    right: var(--space-4);
    transform: translateY(-50%);
    background: var(--accent-primary);
    color: var(--primary-bg);
    border: none;
    border-radius: var(--border-radius);
    padding: var(--space-3);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: var(--transition);
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
    font-size: 11px;
}

.tutorial-toggle:hover {
    background: var(--text-primary);
    transform: translateY(-50%) scale(1.05);
}

.tutorial-toggle i {
    font-size: 1rem;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal.open {
    display: flex;
}

.modal-content {
    background: var(--primary-bg);
    border-radius: var(--border-radius);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.modal-large {
    max-width: 900px;
}

.modal-header {
    background: var(--secondary-bg);
    padding: var(--space-4);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--tertiary-bg);
    color: var(--text-primary);
}

.modal-body {
    padding: var(--space-6);
}

.modal-footer {
    background: var(--secondary-bg);
    padding: var(--space-4);
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: var(--space-2);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

/* Settings */
.settings-group {
    margin-bottom: var(--space-4);
}

.settings-group label {
    display: block;
    margin-bottom: var(--space-2);
    font-weight: 500;
    color: var(--text-primary);
    font-size: var(--font-size-sm);
}

.settings-group input,
.settings-group select {
    width: 100%;
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: var(--font-size-sm);
    background: var(--primary-bg);
    color: var(--text-primary);
    font-family: var(--font-family);
}

.settings-group input:focus,
.settings-group select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px var(--focus-ring);
}

.settings-group input[type="checkbox"] {
    width: auto;
    margin-right: var(--space-2);
}

/* Session Info */
.session-info {
    display: grid;
    gap: var(--space-3);
}

.info-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-2) 0;
    border-bottom: 1px solid var(--border-light);
}

.info-group:last-child {
    border-bottom: none;
}

.info-group label {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.info-group span {
    color: var(--text-primary);
    font-size: var(--font-size-sm);
}

.status {
    padding: var(--space-1) var(--space-2);
    border-radius: var(--border-radius-sm);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}

.status.connected {
    background: rgba(74, 93, 35, 0.1);
    color: var(--accent-success);
}

.status.demo {
    background: rgba(45, 74, 93, 0.1);
    color: var(--accent-info);
}

/* Code Display */
.code-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: var(--space-4);
}

.tab-btn {
    background: none;
    border: none;
    padding: var(--space-3) var(--space-4);
    cursor: pointer;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    transition: var(--transition);
    font-size: var(--font-size-sm);
}

.tab-btn.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

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

.code-content {
    background: var(--tertiary-bg);
    border-radius: var(--border-radius);
    padding: var(--space-4);
    overflow-x: auto;
    border: 1px solid var(--border-color);
}

.code-content pre {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.5;
    font-family: var(--font-mono);
    color: var(--text-primary);
}

.code-actions {
    display: flex;
    gap: var(--space-2);
    align-items: center;
}

/* Error Container */
.error-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.error-content {
    background: var(--primary-bg);
    border-radius: var(--border-radius);
    padding: var(--space-8);
    text-align: center;
    max-width: 500px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.error-content i {
    font-size: 2rem;
    color: var(--accent-danger);
    margin-bottom: var(--space-4);
}

.error-content h3 {
    margin: 0 0 var(--space-2) 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.error-content p {
    margin: 0 0 var(--space-6) 0;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.error-actions {
    display: flex;
    gap: var(--space-2);
    justify-content: center;
}

/* Alerts */
.alert {
    padding: var(--space-3) var(--space-4);
    border-radius: var(--border-radius);
    margin-bottom: var(--space-4);
    border: 1px solid transparent;
    font-size: var(--font-size-sm);
}

.alert-danger {
    background: rgba(122, 46, 46, 0.1);
    color: var(--accent-danger);
    border-color: rgba(122, 46, 46, 0.2);
}

.alert-success {
    background: rgba(74, 93, 35, 0.1);
    color: var(--accent-success);
    border-color: rgba(74, 93, 35, 0.2);
}

.alert-info {
    background: rgba(45, 74, 93, 0.1);
    color: var(--accent-info);
    border-color: rgba(45, 74, 93, 0.2);
}

/* API Key Feedback */
.api-key-feedback {
    margin-top: var(--space-3);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--border-radius);
    font-size: var(--font-size-sm);
    display: none;
    align-items: center;
    gap: var(--space-2);
}

.api-key-feedback.success {
    background: rgba(74, 93, 35, 0.1);
    color: var(--accent-success);
    border: 1px solid rgba(74, 93, 35, 0.2);
}

.api-key-feedback.error {
    background: rgba(122, 46, 46, 0.1);
    color: var(--accent-danger);
    border: 1px solid rgba(122, 46, 46, 0.2);
}

.api-key-feedback.info {
    background: rgba(45, 74, 93, 0.1);
    color: var(--accent-info);
    border: 1px solid rgba(45, 74, 93, 0.2);
}

/* Loading States */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.loading-overlay.hidden {
    display: none;
}

.loading-content {
    text-align: center;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto var(--space-4);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

/* Scrollbar Styling */
.chat-messages::-webkit-scrollbar,
.tutorial-sidebar::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track,
.tutorial-sidebar::-webkit-scrollbar-track {
    background: var(--tertiary-bg);
}

.chat-messages::-webkit-scrollbar-thumb,
.tutorial-sidebar::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--border-radius-sm);
}

.chat-messages::-webkit-scrollbar-thumb:hover,
.tutorial-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--border-medium);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: var(--space-4);
        text-align: center;
    }

    .tutorial-actions {
        flex-wrap: wrap;
        justify-content: center;
    }

    .setup-options {
        grid-template-columns: 1fr;
    }

    .api-key-input {
        flex-direction: column;
    }

    .video-interface {
        height: calc(100vh - 160px);
    }

    .video-header {
        flex-direction: column;
        gap: var(--space-2);
        text-align: center;
    }

    .call-stats {
        justify-content: center;
    }

    .video-grid {
        grid-template-columns: 1fr;
    }

    .call-controls {
        flex-wrap: wrap;
        gap: var(--space-4);
    }

    .control-group {
        justify-content: center;
    }

    .chat-panel {
        width: 100%;
        right: -100%;
    }

    .tutorial-sidebar {
        width: 100%;
        right: -100%;
    }

    .tutorial-toggle {
        right: var(--space-2);
        padding: var(--space-2);
    }

    .modal-content {
        width: 95%;
        margin: var(--space-4);
    }

    .error-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-2);
    }

    .tutorial-info h1 {
        font-size: 1.25rem;
    }

    .setup-card {
        padding: var(--space-6);
        margin: 0 var(--space-2);
    }

    .video-interface {
        height: calc(100vh - 140px);
    }

    .video-grid-container {
        padding: var(--space-2);
    }

    .video-grid {
        gap: var(--space-2);
    }

    .call-controls {
        padding: var(--space-3);
        gap: var(--space-3);
    }

    .call-controls .btn {
        min-width: 40px;
        height: 40px;
    }

    .chat-messages {
        padding: var(--space-2);
    }

    .chat-form {
        padding: var(--space-3);
    }

    .chat-form input {
        padding: var(--space-2);
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.d-flex { display: flex; }
.d-block { display: block; }
.d-none { display: none; }

.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.align-items-center { align-items: center; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-4); }
.mb-4 { margin-bottom: var(--space-6); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-4); }
.mt-4 { margin-top: var(--space-6); }

.p-0 { padding: 0; }
.p-1 { padding: var(--space-1); }
.p-2 { padding: var(--space-2); }
.p-3 { padding: var(--space-4); }
.p-4 { padding: var(--space-6); }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

/* Footer Styles - From blogs.html */
.footer {
    background-color: #111827;
    color: #d1d5db;
    padding: 3rem 2rem 2rem;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #9ca3af;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.footer-section a:hover {
    color: #d1d5db;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
}

.footer-bottom-left p {
    color: #9ca3af;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.footer-bottom-links {
    display: flex;
    gap: 1.5rem;
}

.footer-bottom-links a {
    color: #9ca3af;
    text-decoration: none;
    font-size: 0.875rem;
}

.footer-bottom-links a:hover {
    color: #d1d5db;
}

.footer-bottom-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.language-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #9ca3af;
    font-size: 0.875rem;
    cursor: pointer;
    position: relative;
}

.language-selector:hover {
    color: #d1d5db;
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 0.375rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    min-width: 120px;
    z-index: 1000;
    margin-top: 0.5rem;
}

.language-option {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    color: #d1d5db;
    font-size: 0.875rem;
}

.language-option:hover {
    background: #374151;
}

.language-option.active {
    background: #374151;
    color: #ffffff;
}

.language-option:first-child {
    border-radius: 0.375rem 0.375rem 0 0;
}

.language-option:last-child {
    border-radius: 0 0 0.375rem 0.375rem;
}

/* Footer Responsive Design */
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-bottom-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .footer-bottom-links {
        flex-direction: column;
        gap: 0.5rem;
    }
}
