/* Apple Glassmorphism Theme (macOS / VisionOS Style) */

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

:root {
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-bg-hover: rgba(255, 255, 255, 0.09);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-border-light: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --glass-inset-highlight: inset 0 1px 1px 0 rgba(255, 255, 255, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", sans-serif;
    background: radial-gradient(circle at 15% 15%, #1e1b4b 0%, #0f172a 40%, #020617 100%);
    background-attachment: fixed;
    color: #f8fafc;
    min-h: 100vh;
}

/* Background Animated Gradient Orbs for Glass Reflection */
.glass-glow-orb-1 {
    position: fixed;
    top: -10%;
    left: 20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.25) 0%, rgba(0,0,0,0) 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(60px);
}

.glass-glow-orb-2 {
    position: fixed;
    bottom: -10%;
    right: 15%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.2) 0%, rgba(0,0,0,0) 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(80px);
}

/* Apple Frosted Glass Panels */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(24px) saturate(190%);
    -webkit-backdrop-filter: blur(24px) saturate(190%);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow), var(--glass-inset-highlight);
    border-radius: 1.25rem; /* 20px */
}

.glass-panel-interactive {
    background: var(--glass-bg);
    backdrop-filter: blur(24px) saturate(190%);
    -webkit-backdrop-filter: blur(24px) saturate(190%);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow), var(--glass-inset-highlight);
    border-radius: 1.25rem;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-panel-interactive:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-light);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.45), var(--glass-inset-highlight);
}

/* Apple Glass Header */
.glass-header {
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--glass-border);
}

/* Apple Glass Inputs / Selects */
.glass-input {
    background: rgba(0, 0, 0, 0.3) !important;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.glass-input:focus {
    border-color: rgba(99, 102, 241, 0.6) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25), inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Apple Glass Buttons */
.glass-btn-primary {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.8) 0%, rgba(79, 70, 229, 0.9) 100%);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.3);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-btn-primary:hover {
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.9) 0%, rgba(99, 102, 241, 1) 100%);
    box-shadow: 0 6px 24px rgba(79, 70, 229, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.4);
    transform: scale(1.02);
}

.glass-btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #e2e8f0;
    transition: all 0.2s ease;
}

.glass-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.35);
}

/* Timeline bar styles */
.timeline-bar {
    position: relative;
    height: 32px;
    background-color: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
}

.timeline-segment {
    position: absolute;
    top: 3px;
    bottom: 3px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 6px;
    transition: all 0.2s ease;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.25);
}

.timeline-segment:hover {
    filter: brightness(1.2);
    transform: scaleY(1.08);
    z-index: 10;
}

.segment-sleep {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.85) 0%, rgba(79, 70, 229, 0.95) 100%);
    border: 1px solid rgba(165, 180, 252, 0.4);
}

.segment-shift {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.85) 0%, rgba(217, 119, 6, 0.95) 100%);
    border: 1px solid rgba(253, 230, 138, 0.4);
}

.segment-meal {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.85) 0%, rgba(5, 150, 105, 0.95) 100%);
    border: 1px solid rgba(110, 231, 183, 0.4);
}

.segment-caffeine {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.85) 0%, rgba(220, 38, 38, 0.95) 100%);
    border: 1px solid rgba(252, 165, 165, 0.4);
}

.segment-routine {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.85) 0%, rgba(8, 145, 178, 0.95) 100%);
    border: 1px solid rgba(103, 232, 249, 0.4);
}
