/* Modern, Professional Design for Zoomie AI Assistant Dashboard */

:root {
    --primary-color: #0d47a1;
    --primary-hover: #0a357a;
    --primary-light: #1e88e5;
    --success-color: #10b981;
    --success-hover: #059669;
    --danger-color: #ef4444;
    --danger-hover: #dc2626;
    --warning-color: #f59e0b;
    --warning-hover: #d97706;
    --info-color: #3b82f6;
    --dark-bg: #020915;
    --card-bg: #ffffff;
    --text-primary: #031633;
    --text-secondary: #1c2a3a;
    --border-color: rgba(13, 71, 161, 0.2);
    --shadow-sm: 0 1px 2px 0 rgba(3, 22, 51, 0.05);
    --shadow: 0 4px 12px -1px rgba(13, 71, 161, 0.15);
    --shadow-lg: 0 16px 28px -10px rgba(3, 22, 51, 0.22);
    --shadow-xl: 0 24px 45px -12px rgba(3, 22, 51, 0.28);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: radial-gradient(circle at top left, #031633 0%, #000000 45%), radial-gradient(circle at bottom right, #0d47a1 0%, #000000 50%);
    background-attachment: fixed;
    min-height: 100vh;
    padding: 0;
    margin: 0;
    color: var(--text-primary);
    line-height: 1.6;
}

body:not(:has(.navbar)) {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Navigation Bar */
.navbar {
    background: rgba(1, 11, 26, 0.85);
    backdrop-filter: blur(25px);
    box-shadow: 0 18px 40px -12px rgba(8, 43, 94, 0.6);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.4rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 8px 20px rgba(13, 71, 161, 0.65);
    transition: transform 0.3s ease;
}

.nav-brand:hover {
    transform: scale(1.02);
}

.brand-icon {
    font-size: 1.8rem;
}

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

.nav-link {
    color: rgba(239, 246, 255, 0.72);
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(14, 94, 197, 0.2), rgba(3, 22, 51, 0.4));
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: -1;
}

.nav-link:hover::before {
    transform: translateX(0);
}

.nav-link:hover {
    color: white;
}

.nav-link.active {
    color: white;
    background: linear-gradient(135deg, rgba(13, 71, 161, 0.65), rgba(3, 22, 51, 0.8));
    font-weight: 700;
    box-shadow: 0 12px 28px rgba(3, 22, 51, 0.45);
}

/* Main Content */
.main-content {
    padding: 32px 20px;
    min-height: calc(100vh - 80px);
}

.container {
    max-width: 1280px;
    width: 100%;
    padding: 40px 24px 80px;
    margin: 0 auto;
}

.card {
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    animation: slideUp 0.5s ease-out;
    border: 1px solid rgba(226, 232, 240, 0.8);
}

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

.card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    padding: 40px 32px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.card-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    50% {
        transform: scale(1.1) rotate(180deg);
    }
}

.card-header h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.card-header p {
    opacity: 0.95;
    font-size: 1.05rem;
    position: relative;
    z-index: 1;
    font-weight: 500;
}

.card-header code {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 6px;
    font-weight: 600;
}

.card-body {
    padding: 48px;
}

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

.form-label {
    display: block;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
    font-size: 0.95rem;
    letter-spacing: -0.01em;
}

.form-input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    font-weight: 500;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

.form-input::placeholder {
    color: #94a3b8;
}

/* Buttons */
.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn span {
    position: relative;
    z-index: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    width: 100%;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.5);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: white;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.5);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), var(--danger-hover));
    color: white;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
}

.btn-danger:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.5);
}

.btn-secondary {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
    box-shadow: 0 4px 14px rgba(107, 114, 128, 0.4);
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(107, 114, 128, 0.5);
}

/* Alerts */
.alert {
    padding: 18px 20px;
    border-radius: 12px;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 600;
    animation: slideIn 0.4s ease-out;
    border-left: 4px solid;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.alert-success {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
    border-color: var(--success-color);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.2);
}

.alert-error {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #991b1b;
    border-color: var(--danger-color);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.2);
}

.alert-info {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1e40af;
    border-color: var(--info-color);
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.2);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    padding: 28px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.stat-card h3 {
    font-size: 0.9rem;
    font-weight: 700;
    opacity: 0.9;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
}

.stat-card .stat-value {
    font-size: 2.8rem;
    font-weight: 900;
    margin-bottom: 8px;
    position: relative;
    line-height: 1;
}

.stat-card .stat-label {
    font-size: 0.95rem;
    opacity: 0.85;
    position: relative;
    font-weight: 500;
}

/* Sessions Table */
.sessions-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.sessions-table thead {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
}

.sessions-table th {
    padding: 18px 20px;
    text-align: left;
    font-weight: 700;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sessions-table td {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 500;
}

.sessions-table tbody tr {
    transition: all 0.2s ease;
}

.sessions-table tbody tr:hover {
    background: #f8fafc;
    transform: scale(1.01);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.sessions-table tbody tr:last-child td {
    border-bottom: none;
}

.status-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: capitalize;
}

.status-active {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
}

.status-joining {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
}

.status-ended {
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    color: #6b7280;
}

/* Helper Text */
.help-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 8px;
    font-weight: 500;
}

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

.mt-3, .mt-4 {
    margin-top: 24px;
}

.mb-4 {
    margin-bottom: 24px;
}

/* Links */
a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Instructions List */
.instructions {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-left: 5px solid var(--primary-color);
    padding: 24px;
    border-radius: 12px;
    margin: 28px 0;
    box-shadow: var(--shadow);
}

.instructions ol {
    margin-left: 24px;
}

.instructions li {
    margin-bottom: 14px;
    line-height: 1.7;
    font-weight: 500;
}

/* Code blocks */
code {
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    padding: 4px 10px;
    border-radius: 6px;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.9rem;
    color: #dc2626;
    font-weight: 600;
    border: 1px solid #e2e8f0;
}

/* Download Section */
.download-section {
    background: rgba(255, 255, 255, 0.95);
    border: 3px dashed var(--border-color);
    border-radius: 16px;
    padding: 48px;
    text-align: center;
    margin: 40px 0;
    transition: all 0.3s ease;
}

.download-section:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.15);
    transform: translateY(-4px);
}

.download-section h2 {
    margin-bottom: 18px;
    color: var(--text-primary);
    font-weight: 800;
}

.download-section p {
    color: var(--text-secondary);
    margin-bottom: 28px;
    font-size: 1.05rem;
    font-weight: 500;
}

.download-icon {
    font-size: 4.5rem;
    margin-bottom: 20px;
    animation: bounce 2s ease-in-out infinite;
}

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

/* Loading Spinner */
.spinner {
    border: 4px solid #f3f4f6;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 24px auto;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .card-body {
        padding: 28px;
    }
    
    .card-header {
        padding: 32px 24px;
    }
    
    .card-header h1 {
        font-size: 1.8rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .download-section {
        padding: 32px 24px;
    }
    
    .nav-container {
        padding: 12px 20px;
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .nav-links {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .sessions-table {
        font-size: 0.9rem;
    }
    
    .sessions-table th,
    .sessions-table td {
        padding: 12px 14px;
    }
    
    .stat-card .stat-value {
        font-size: 2.2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px 16px;
    }
    
    .card-body {
        padding: 20px;
    }
    
    .nav-brand {
        font-size: 1.2rem;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 0.95rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}