/* Custom Premium Stylesheet for AgeCalcPro AI */

:root {
    --color-background: #0c1324;
    --color-surface: #0c1324;
    --color-surface-container: #191f31;
    --color-surface-container-low: #151b2d;
    --color-surface-container-high: #23293c;
    --color-surface-container-highest: #2e3447;
    --color-primary: #c3c0ff;
    --color-primary-container: #4f46e5;
    --color-secondary: #d2bbff;
    --color-secondary-container: #6001d1;
    --color-tertiary: #4cd7f6;
    --color-tertiary-container: #006a7c;
    --color-outline: #918fa1;
    --color-outline-variant: #464555;
    --color-on-surface: #dce1fb;
    --color-on-surface-variant: #c7c4d8;
    --color-error: #ffb4ab;
}

body {
    background-color: var(--color-background);
    color: var(--color-on-surface);
    font-family: 'Geist', sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(79, 70, 229, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 90% 70%, rgba(76, 215, 246, 0.08) 0%, transparent 45%);
    background-attachment: fixed;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--color-background);
}
::-webkit-scrollbar-thumb {
    background: var(--color-surface-container-highest);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary-container);
}

/* Glassmorphism Panel styles */
.glass-panel {
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 
        inset 0 1px 0 0 rgba(255, 255, 255, 0.05),
        0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

/* Glass Input Focus & Glow - High Visibility (Bold Black Text on Solid White) */
.glass-input {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.25) !important;
    color: #000000 !important;
    font-weight: 700 !important;
    color-scheme: light !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.glass-input:focus {
    border-color: var(--color-primary-container) !important;
    box-shadow: 0 0 12px rgba(79, 70, 229, 0.3) !important;
    outline: none !important;
}
.glass-input::placeholder {
    color: rgba(0, 0, 0, 0.55) !important;
    font-weight: 600 !important;
}


/* Buttons and Gradient Backgrounds */
.primary-gradient-btn {
    background: linear-gradient(135deg, var(--color-primary-container) 0%, var(--color-secondary-container) 100%);
    box-shadow: 
        inset 0 1px 0 0 rgba(255, 255, 255, 0.2), 
        0 8px 24px -6px rgba(79, 70, 229, 0.35);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.primary-gradient-btn:hover {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 
        inset 0 1px 0 0 rgba(255, 255, 255, 0.3), 
        0 12px 32px -4px rgba(79, 70, 229, 0.5);
}
.primary-gradient-btn:active {
    transform: translateY(1px) scale(0.98);
}

/* Ambient glow spots */
.ambient-spot {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
}

/* Glowing Border for AI elements */
.ai-border-glow {
    position: relative;
    border-radius: 12px;
}
.ai-border-glow::before {
    content: '';
    position: absolute;
    inset: -1.5px;
    background: linear-gradient(90deg, var(--color-primary-container), var(--color-tertiary), var(--color-secondary-container), var(--color-primary-container));
    background-size: 300% auto;
    border-radius: inherit;
    z-index: -1;
    animation: borderGradientRun 4s linear infinite;
    opacity: 0.5;
}
@keyframes borderGradientRun {
    0% { background-position: 0% center; }
    100% { background-position: 300% center; }
}

/* Future aging visual scanning animation */
.scanline-effect {
    position: absolute;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, transparent, var(--color-tertiary), transparent);
    box-shadow: 0 0 15px var(--color-tertiary);
    animation: scanAnimation 3s ease-in-out infinite;
    z-index: 10;
    pointer-events: none;
}
@keyframes scanAnimation {
    0% { top: 0%; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

/* Custom Range Input */
input[type=range].custom-slider {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
}
input[type=range].custom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: var(--color-primary);
    cursor: pointer;
    margin-top: -8px;
    box-shadow: 0 0 10px rgba(79, 70, 229, 0.5);
    border: 2px solid #ffffff;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
input[type=range].custom-slider::-webkit-slider-thumb:hover {
    transform: scale(1.25);
}
input[type=range].custom-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: var(--color-outline-variant);
    border-radius: 2px;
}

/* Navigation link states */
.nav-link {
    position: relative;
    transition: color 0.3s ease;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--color-primary);
    transition: width 0.3s ease;
}
.nav-link.active {
    color: var(--color-primary);
    font-weight: 700;
}
.nav-link.active::after {
    width: 100%;
}

/* Page transitions */
.page-view {
    display: none;
    animation: pageFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.page-view.active {
    display: block;
}
@keyframes pageFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Cellular gauge progress */
.gauge-svg {
    transform: rotate(-90deg);
}
.gauge-circle {
    transition: stroke-dashoffset 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Heartbeat pulse */
.pulse-icon {
    animation: beatEffect 1.5s infinite;
}
@keyframes beatEffect {
    0%, 100% { transform: scale(1); }
    30% { transform: scale(1.15); }
    60% { transform: scale(1); }
}

/* Sidebar item active state */
.sidebar-link.active {
    background-color: rgba(79, 70, 229, 0.15);
    border-color: rgba(195, 192, 255, 0.3);
    color: var(--color-primary);
}

/* Material symbols adjustments */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
}
.material-symbols-outlined.filled {
    font-variation-settings: 'FILL' 1;
}

/* Dynamic bento items styles */
.bento-card {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}
.bento-card:hover {
    transform: translateY(-4px);
    border-color: rgba(76, 215, 246, 0.4);
    box-shadow: 0 15px 35px -10px rgba(76, 215, 246, 0.15);
}

/* Premium Toast Notification System */
#toast-container {
    padding: 16px;
    max-width: 420px;
    width: 100%;
}
.toast-success {
    border-left-color: #10b981 !important; /* Emerald success border */
}
.toast-error {
    border-left-color: #ef4444 !important; /* Rose error border */
}
.toast-warning {
    border-left-color: #f59e0b !important; /* Amber warning border */
}
.toast-info {
    border-left-color: var(--color-primary) !important;
}
.glass-panel.toast-item {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        inset 0 1px 0 0 rgba(255, 255, 255, 0.05),
        0 20px 40px -15px rgba(0, 0, 0, 0.7);
}

