/* PediCare Custom Styles */
/* Mobile-first CSS with CSS Variables */

:root {
    /* Typography Scale */
    --font-size-xs: 0.75rem;    /* 12px */
    --font-size-sm: 0.875rem;   /* 14px */
    --font-size-base: 1rem;     /* 16px */
    --font-size-lg: 1.125rem;   /* 18px */
    --font-size-xl: 1.25rem;    /* 20px */
    --font-size-2xl: 1.5rem;    /* 24px */
    --font-size-3xl: 1.875rem;  /* 30px */
    --font-size-4xl: 2.25rem;   /* 36px */

    /* Spacing Scale */
    --spacing-xs: 0.25rem;      /* 4px */
    --spacing-sm: 0.5rem;       /* 8px */
    --spacing-md: 1rem;         /* 16px */
    --spacing-lg: 1.5rem;       /* 24px */
    --spacing-xl: 2rem;         /* 32px */
    --spacing-2xl: 3rem;        /* 48px */

    /* Colors */
    --color-primary: #7c3aed;
    --color-primary-light: #a78bfa;
    --color-primary-dark: #6d28d9;
    --color-secondary: #f97316;
    --color-secondary-light: #fb923c;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --color-doctor: #2563eb;

    /* Chart Heights */
    --chart-height-sm: 150px;
    --chart-height-md: 200px;
    --chart-height-lg: 280px;

    /* Mobile Container */
    --mobile-width: 375px;
    --bottom-nav-height: 64px;
    --header-height: 56px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    /* Border Radius */
    --radius-sm: 0.375rem;      /* 6px */
    --radius-md: 0.5rem;        /* 8px */
    --radius-lg: 0.75rem;       /* 12px */
    --radius-xl: 1rem;          /* 16px */
    --radius-2xl: 1.5rem;       /* 24px */
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 200ms ease;
    --transition-slow: 300ms ease;
}

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

html {
    font-size: 16px;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Nunito', sans-serif;
    line-height: 1.5;
    color: #1f2937;
    background-color: #f3f4f6;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Mobile Container - Simulates app viewport */
.mobile-container {
    width: var(--mobile-width);
    max-width: 100%;
    min-height: 100vh;
    position: relative;
    box-shadow: var(--shadow-lg);
}

/* Desktop: center the mobile container */
@media (min-width: 768px) {
    body {
        display: flex;
        justify-content: center;
        align-items: flex-start;
        padding: 20px 0;
        min-height: 100vh;
    }

    .mobile-container {
        min-height: calc(100vh - 40px);
        border-radius: var(--radius-xl);
        overflow: hidden;
    }
}

/* Mobile: Full-width, no simulation */
@media (max-width: 767px) {
    :root {
        --mobile-width: 100%;
    }

    body {
        padding: 0;
    }

    .mobile-container {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-shadow: none;
    }

    .bottom-nav {
        left: 0;
        transform: none;
        width: 100%;
    }

    .fab {
        right: 16px;
    }

    .modal-sheet {
        left: 0;
        transform: none;
        max-width: 100%;
        width: 100%;
    }

    .toast {
        left: 50%;
        transform: translateX(-50%);
        max-width: calc(100% - 32px);
    }
}

/* Header Styles */
.app-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 var(--spacing-md);
    background: white;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 40;
}

.app-header-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    flex: 1;
    text-align: center;
}

.app-header-back,
.app-header-action {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    transition: background-color var(--transition-fast);
}

.app-header-back:active,
.app-header-action:active {
    background-color: #f3f4f6;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: var(--mobile-width);
    max-width: 100%;
    height: var(--bottom-nav-height);
    background: white;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 50;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xs) var(--spacing-sm);
    color: #6b7280;
    text-decoration: none;
    transition: color var(--transition-fast);
    min-width: 64px;
}

.bottom-nav-item.active {
    color: var(--color-primary);
}

.bottom-nav-item:active {
    opacity: 0.7;
}

.bottom-nav-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 2px;
}

.bottom-nav-label {
    font-size: var(--font-size-xs);
    font-weight: 500;
}

/* Page Content with Bottom Nav */
.page-content {
    padding-bottom: calc(var(--bottom-nav-height) + var(--spacing-md));
}

/* Cards */
.card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: var(--spacing-md);
}

.card-elevated {
    box-shadow: var(--shadow-md);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: var(--font-size-base);
    font-weight: 600;
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
    cursor: pointer;
    border: none;
    outline: none;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
}

.btn-secondary {
    background-color: #f3f4f6;
    color: #374151;
}

.btn-secondary:hover {
    background-color: #e5e7eb;
}

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

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

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: var(--font-size-sm);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: var(--font-size-lg);
}

.btn-block {
    width: 100%;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: var(--font-size-xs);
    font-weight: 600;
    border-radius: var(--radius-full);
}

.badge-primary {
    background-color: #ede9fe;
    color: var(--color-primary);
}

.badge-success {
    background-color: #d1fae5;
    color: #059669;
}

.badge-warning {
    background-color: #fef3c7;
    color: #d97706;
}

.badge-danger {
    background-color: #fee2e2;
    color: #dc2626;
}

.badge-gray {
    background-color: #f3f4f6;
    color: #6b7280;
}

.badge-doctor {
    background-color: #dbeafe;
    color: var(--color-doctor);
}

/* Skeleton Loaders */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-md);
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-text {
    height: 1em;
    margin-bottom: 0.5em;
}

.skeleton-text:last-child {
    width: 70%;
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
}

.skeleton-card {
    height: 120px;
}

.skeleton-chart {
    height: var(--chart-height-md);
}

/* Empty States */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-2xl) var(--spacing-lg);
    text-align: center;
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    color: #d1d5db;
    margin-bottom: var(--spacing-md);
}

.empty-state-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: #374151;
    margin-bottom: var(--spacing-xs);
}

.empty-state-message {
    font-size: var(--font-size-sm);
    color: #6b7280;
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: calc(var(--bottom-nav-height) + var(--spacing-md));
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(var(--mobile-width) - 2 * var(--spacing-md));
    padding: 0.75rem 1rem;
    background: #1f2937;
    color: white;
    border-radius: var(--radius-lg);
    font-size: var(--font-size-sm);
    font-weight: 500;
    z-index: 100;
    animation: toast-in 0.3s ease;
}

.toast-success {
    background: var(--color-success);
}

.toast-error {
    background: var(--color-danger);
}

.toast-warning {
    background: var(--color-warning);
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Modal / Bottom Sheet */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 60;
    animation: fade-in 0.2s ease;
}

.modal-sheet {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: var(--mobile-width);
    max-height: 90vh;
    background: white;
    border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
    z-index: 70;
    animation: slide-up 0.3s ease;
    overflow-y: auto;
}

.modal-sheet-handle {
    width: 36px;
    height: 4px;
    background: #d1d5db;
    border-radius: var(--radius-full);
    margin: var(--spacing-sm) auto var(--spacing-md);
}

.modal-sheet-header {
    padding: 0 var(--spacing-md) var(--spacing-md);
    border-bottom: 1px solid #e5e7eb;
}

.modal-sheet-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    text-align: center;
}

.modal-sheet-content {
    padding: var(--spacing-md);
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slide-up {
    from {
        transform: translateX(-50%) translateY(100%);
    }
    to {
        transform: translateX(-50%) translateY(0);
    }
}

/* Chart Container */
.chart-container {
    position: relative;
    width: 100%;
}

.chart-container-sm {
    height: var(--chart-height-sm);
}

.chart-container-md {
    height: var(--chart-height-md);
}

.chart-container-lg {
    height: var(--chart-height-lg);
}

/* Form Inputs */
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: var(--font-size-base);
    border: 1px solid #d1d5db;
    border-radius: var(--radius-lg);
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.form-input::placeholder {
    color: #9ca3af;
}

.form-label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: #374151;
    margin-bottom: var(--spacing-xs);
}

.form-error {
    font-size: var(--font-size-xs);
    color: var(--color-danger);
    margin-top: var(--spacing-xs);
}

/* List Items */
.list-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: var(--spacing-md);
    background: white;
    border-bottom: 1px solid #f3f4f6;
    text-decoration: none;
    overflow: hidden;
}

.list-item:last-child {
    border-bottom: none;
}

.list-item:active {
    background: #f9fafb;
}

.list-item-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    max-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border-radius: var(--radius-full);
    flex: 0 0 40px;
    margin-right: var(--spacing-md);
}

.list-item-content {
    flex: 1 1 auto;
    min-width: 0;
    margin-right: var(--spacing-md);
}

.list-item-title {
    font-size: var(--font-size-base);
    font-weight: 500;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-item-subtitle {
    font-size: var(--font-size-sm);
    color: #6b7280;
}

.list-item-action {
    color: #9ca3af;
    flex: 0 0 auto;
}

/* Chevron icons in list items */
.list-item > i,
.list-item > svg {
    flex: 0 0 20px;
    width: 20px !important;
    height: 20px !important;
    display: inline-block !important;
}

/* Floating Action Button */
.fab {
    position: fixed;
    bottom: calc(var(--bottom-nav-height) + var(--spacing-md));
    right: calc(50% - var(--mobile-width) / 2 + var(--spacing-md));
    width: 56px;
    height: 56px;
    background: var(--color-primary);
    color: white;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    z-index: 30;
    cursor: pointer;
    transition: transform var(--transition-fast), background-color var(--transition-fast);
}

.fab:hover {
    background: var(--color-primary-dark);
}

.fab:active {
    transform: scale(0.95);
}

/* Swipe Card (for Tips) */
.swipe-card {
    position: absolute;
    inset: 0;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.swipe-card-content {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--color-primary);
    border-radius: var(--radius-full);
    transition: width var(--transition-normal);
}

.progress-bar-success .progress-bar-fill {
    background: var(--color-success);
}

.progress-bar-warning .progress-bar-fill {
    background: var(--color-warning);
}

/* Status Indicator */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    display: inline-block;
}

.status-dot-success {
    background: var(--color-success);
}

.status-dot-warning {
    background: var(--color-warning);
}

.status-dot-danger {
    background: var(--color-danger);
}

.status-dot-gray {
    background: #9ca3af;
}

/* Tap Highlight Override */
a, button {
    -webkit-tap-highlight-color: transparent;
}

/* Pull to Refresh Indicator */
.pull-indicator {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
}

.pull-indicator.loading {
    animation: spin 1s linear infinite;
}

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

/* Video Card */
.video-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #f3f4f6;
}

.video-card-thumbnail {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.video-card-duration {
    position: absolute;
    bottom: var(--spacing-sm);
    right: var(--spacing-sm);
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-weight: 500;
}

.video-card-lock {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

/* Vaccine Row */
.vaccine-row {
    display: flex;
    align-items: center;
    padding: var(--spacing-md);
    background: white;
    border-bottom: 1px solid #f3f4f6;
}

.vaccine-row-indicator {
    width: 12px;
    height: 12px;
    border-radius: var(--radius-full);
    margin-right: var(--spacing-md);
}

.vaccine-row-indicator.given {
    background: var(--color-success);
}

.vaccine-row-indicator.due {
    background: var(--color-warning);
}

.vaccine-row-indicator.overdue {
    background: var(--color-danger);
}

.vaccine-row-indicator.pending {
    background: #d1d5db;
}

.vaccine-row-indicator.skipped {
    background: #94a3b8;
}

/* Avatar */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--color-primary-light);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: var(--font-size-base);
}

.avatar-sm {
    width: 32px;
    height: 32px;
    font-size: var(--font-size-sm);
}

.avatar-lg {
    width: 56px;
    height: 56px;
    font-size: var(--font-size-xl);
}

.avatar-xl {
    width: 80px;
    height: 80px;
    font-size: var(--font-size-2xl);
}

/* Doctor Verified Badge */
.doctor-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: #dbeafe;
    color: var(--color-doctor);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 600;
}

.doctor-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--color-doctor);
    border-radius: var(--radius-full);
}

/* Utility Classes */
.text-primary { color: var(--color-primary); }
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }
.text-danger { color: var(--color-danger); }

.bg-primary { background-color: var(--color-primary); }
.bg-success { background-color: var(--color-success); }
.bg-warning { background-color: var(--color-warning); }
.bg-danger { background-color: var(--color-danger); }

/* Hide scrollbar but keep functionality */
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

/* Safe area padding for iOS */
.safe-area-bottom {
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.safe-area-top {
    padding-top: env(safe-area-inset-top, 0);
}

/* ========================================
   Journey Map Styles
   ======================================== */

/* Phase Selector Chips */
.journey-phase-chips {
    display: flex;
    gap: 8px;
    padding: 0 16px 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.journey-phase-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: var(--font-size-sm);
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 2px solid transparent;
    background: #f3f4f6;
    color: #6b7280;
}

.journey-phase-chip.active {
    background: var(--color-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.journey-phase-chip:not(.active):hover {
    background: #e5e7eb;
}

.journey-phase-chip .emoji {
    font-size: 16px;
}

/* Journey Map Container */
.journey-map {
    padding: 16px;
    min-height: calc(100vh - 200px);
    position: relative;
}

/* Phase Header */
.journey-phase-header {
    text-align: center;
    padding: 16px;
    margin-bottom: 24px;
    border-radius: var(--radius-xl);
}

.journey-phase-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    margin-bottom: 4px;
}

.journey-phase-subtitle {
    font-size: var(--font-size-sm);
    opacity: 0.8;
}

/* Journey Path Container */
.journey-path {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Path Connector Line */
.journey-path::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 40px;
    bottom: 40px;
    width: 4px;
    background: linear-gradient(180deg, #e5e7eb 0%, #d1d5db 100%);
    transform: translateX(-50%);
    border-radius: 2px;
    z-index: 0;
}

/* Week Station Node */
.journey-node {
    position: relative;
    display: flex;
    align-items: center;
    padding: 8px 0;
    z-index: 1;
}

.journey-node:nth-child(odd) {
    flex-direction: row;
}

.journey-node:nth-child(even) {
    flex-direction: row-reverse;
}

.journey-node-content {
    flex: 1;
    max-width: 45%;
}

.journey-node:nth-child(odd) .journey-node-content {
    text-align: right;
    padding-right: 16px;
}

.journey-node:nth-child(even) .journey-node-content {
    text-align: left;
    padding-left: 16px;
}

/* Station Island */
.journey-station {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: white;
    border: 4px solid #e5e7eb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    z-index: 2;
}

.journey-station-icon {
    font-size: 24px;
    line-height: 1;
}

.journey-station-week {
    font-size: var(--font-size-xs);
    font-weight: 700;
    color: #6b7280;
    margin-top: 2px;
}

/* Station States */
.journey-station.completed {
    border-color: var(--color-success);
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
}

.journey-station.completed .journey-station-week {
    color: #059669;
}

.journey-station.current {
    border-color: var(--color-primary);
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    animation: journey-pulse 2s ease-in-out infinite;
    box-shadow: 0 0 0 8px rgba(124, 58, 237, 0.15), 0 4px 12px rgba(0, 0, 0, 0.1);
}

.journey-station.current .journey-station-week {
    color: var(--color-primary);
}

.journey-station.vaccine_alert {
    border-color: var(--color-warning);
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    animation: journey-glow-amber 2s ease-in-out infinite;
}

.journey-station.vaccine_alert .journey-station-week {
    color: #d97706;
}

.journey-station.locked {
    border-color: #d1d5db;
    background: #f3f4f6;
    opacity: 0.6;
    cursor: default;
}

.journey-station.locked .journey-station-icon {
    filter: grayscale(100%);
    opacity: 0.5;
}

.journey-station.past {
    border-color: #9ca3af;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
}

/* Current Week "YOU" Banner */
.journey-station.current::after {
    content: 'NOW';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-primary);
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Lock Icon Overlay */
.journey-station.locked::before {
    content: '🔒';
    position: absolute;
    font-size: 16px;
    opacity: 0.8;
}

/* Star Display */
.journey-stars {
    display: flex;
    justify-content: center;
    gap: 2px;
    margin-top: 4px;
}

.journey-star {
    font-size: 12px;
    line-height: 1;
}

.journey-star.earned {
    color: #fbbf24;
}

.journey-star.empty {
    color: #d1d5db;
}

/* Node Info Card */
.journey-node-info {
    background: white;
    border-radius: var(--radius-lg);
    padding: 10px 14px;
    box-shadow: var(--shadow-sm);
    border: 1px solid #e5e7eb;
}

.journey-node-title {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

.journey-node-badges {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.journey-node:nth-child(odd) .journey-node-badges {
    justify-content: flex-end;
}

.journey-node-badge {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
}

.journey-node-badge.vaccine {
    background: #dcfce7;
    color: #15803d;
}

.journey-node-badge.milestone {
    background: #e0e7ff;
    color: #4338ca;
}

.journey-node-badge.tip {
    background: #fef3c7;
    color: #b45309;
}

/* Animations */
@keyframes journey-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 8px rgba(124, 58, 237, 0.15), 0 4px 12px rgba(0, 0, 0, 0.1);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 12px rgba(124, 58, 237, 0.1), 0 6px 16px rgba(0, 0, 0, 0.15);
    }
}

@keyframes journey-glow-amber {
    0%, 100% {
        box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.2), 0 4px 12px rgba(0, 0, 0, 0.1);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(245, 158, 11, 0.15), 0 6px 16px rgba(0, 0, 0, 0.15);
    }
}

@keyframes sparkle {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

.journey-station.completed .journey-stars .journey-star.earned {
    animation: sparkle 2s ease-in-out infinite;
}

.journey-station.completed .journey-stars .journey-star.earned:nth-child(2) {
    animation-delay: 0.3s;
}

.journey-station.completed .journey-stars .journey-star.earned:nth-child(3) {
    animation-delay: 0.6s;
}

/* Journey FAB - Jump to Current Week */
.journey-fab {
    position: fixed;
    bottom: calc(var(--bottom-nav-height) + 16px);
    right: calc(50% - var(--mobile-width) / 2 + 16px);
    background: linear-gradient(135deg, var(--color-primary) 0%, #6d28d9 100%);
    color: white;
    border: none;
    border-radius: 28px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--font-size-sm);
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.4);
    cursor: pointer;
    z-index: 30;
    transition: all var(--transition-fast);
}

.journey-fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.5);
}

.journey-fab:active {
    transform: translateY(0);
}

@media (max-width: 767px) {
    .journey-fab {
        right: 16px;
    }
}

/* Journey Week Modal */
.journey-modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.journey-modal-week-badge {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
}

.journey-modal-week-badge .emoji {
    font-size: 20px;
}

.journey-modal-week-badge .week {
    font-size: var(--font-size-xs);
    font-weight: 700;
    color: var(--color-primary);
}

.journey-modal-title {
    flex: 1;
}

.journey-modal-title h2 {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.journey-modal-title p {
    font-size: var(--font-size-sm);
    color: #6b7280;
    margin: 4px 0 0;
}

.journey-modal-section {
    padding: 16px;
    border-bottom: 1px solid #f3f4f6;
}

.journey-modal-section:last-child {
    border-bottom: none;
}

.journey-modal-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: #374151;
    margin-bottom: 12px;
}

.journey-modal-section-title i {
    width: 18px;
    height: 18px;
    color: var(--color-primary);
}

/* Vaccine Items in Modal */
.journey-vaccine-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f9fafb;
    border-radius: var(--radius-lg);
    margin-bottom: 8px;
}

.journey-vaccine-item:last-child {
    margin-bottom: 0;
}

.journey-vaccine-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #dcfce7;
    display: flex;
    align-items: center;
    justify-content: center;
}

.journey-vaccine-icon i {
    width: 20px;
    height: 20px;
    color: #15803d;
}

.journey-vaccine-info {
    flex: 1;
}

.journey-vaccine-name {
    font-weight: 600;
    color: #1f2937;
    font-size: var(--font-size-sm);
}

.journey-vaccine-desc {
    font-size: var(--font-size-xs);
    color: #6b7280;
}

.journey-vaccine-action {
    flex-shrink: 0;
}

/* Task Checklist in Modal */
.journey-task-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
}

.journey-task-item:last-child {
    border-bottom: none;
}

.journey-task-checkbox {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #d1d5db;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.journey-task-checkbox.checked {
    background: var(--color-success);
    border-color: var(--color-success);
    color: white;
}

.journey-task-checkbox i {
    width: 14px;
    height: 14px;
}

.journey-task-label {
    flex: 1;
    font-size: var(--font-size-sm);
    color: #374151;
}

.journey-task-label.completed {
    text-decoration: line-through;
    color: #9ca3af;
}

/* Video Recommendation in Modal */
.journey-video-card {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: #f9fafb;
    border-radius: var(--radius-lg);
    cursor: pointer;
}

.journey-video-card:hover {
    background: #f3f4f6;
}

.journey-video-thumb {
    width: 100px;
    height: 60px;
    border-radius: var(--radius-md);
    background: #e5e7eb;
    object-fit: cover;
}

.journey-video-info {
    flex: 1;
}

.journey-video-title {
    font-weight: 600;
    font-size: var(--font-size-sm);
    color: #1f2937;
    margin-bottom: 4px;
}

.journey-video-meta {
    font-size: var(--font-size-xs);
    color: #6b7280;
}

/* Mark Complete Button */
.journey-complete-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--color-success) 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: var(--font-size-base);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.journey-complete-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.journey-complete-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.journey-complete-btn i {
    width: 20px;
    height: 20px;
}

/* Corrected Age Badge */
.journey-corrected-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: #fef3c7;
    color: #b45309;
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 600;
}

.journey-corrected-badge i {
    width: 14px;
    height: 14px;
}

/* Enhanced Week Modal Styles */
.journey-modal-section {
    padding: 16px;
    border-bottom: 1px solid #f3f4f6;
}

.journey-modal-section:last-child {
    border-bottom: none;
}

.journey-modal-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: #374151;
    margin-bottom: 12px;
}

.journey-modal-section-title i,
.journey-modal-section-title svg {
    width: 18px;
    height: 18px;
    color: var(--color-primary);
}

/* Vaccine items */
.journey-vaccine-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f9fafb;
    border-radius: var(--radius-lg);
    margin-bottom: 8px;
}

.journey-vaccine-item:last-child {
    margin-bottom: 0;
}

.journey-vaccine-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.journey-vaccine-info {
    flex: 1;
    min-width: 0;
}

.journey-vaccine-name {
    font-weight: 600;
    color: #1f2937;
    font-size: var(--font-size-sm);
}

.journey-vaccine-desc {
    font-size: var(--font-size-xs);
    color: #6b7280;
}

.journey-vaccine-action {
    flex-shrink: 0;
}

/* Week modal header enhanced */
.journey-modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.journey-modal-week-badge {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    flex-shrink: 0;
}

.journey-modal-week-badge .emoji {
    font-size: 20px;
    line-height: 1;
}

.journey-modal-week-badge .week {
    font-size: var(--font-size-xs);
    font-weight: 700;
}

.journey-modal-title {
    flex: 1;
    min-width: 0;
}

.journey-modal-title h2 {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.journey-modal-title p {
    font-size: var(--font-size-sm);
    color: #6b7280;
    margin: 2px 0 0;
}

/* Complete button */
.journey-complete-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--color-primary) 0%, #6d28d9 100%);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: var(--font-size-base);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.journey-complete-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(124, 58, 237, 0.4);
}

.journey-complete-btn:disabled {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    cursor: default;
    transform: none;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.journey-complete-btn i,
.journey-complete-btn svg {
    width: 20px;
    height: 20px;
}

/* Quick action buttons in modal */
.journey-modal-section .grid button {
    transition: all var(--transition-fast);
}

.journey-modal-section .grid button:active {
    transform: scale(0.95);
}

/* Milestone domain badges */
.journey-milestone-badge {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-weight: 600;
}

/* Video cards in modal */
.journey-video-card {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: #f9fafb;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.journey-video-card:hover {
    background: #f3f4f6;
}

.journey-video-thumb {
    width: 100px;
    height: 60px;
    border-radius: var(--radius-md);
    background: #e5e7eb;
    object-fit: cover;
    flex-shrink: 0;
}

.journey-video-info {
    flex: 1;
    min-width: 0;
}

.journey-video-title {
    font-weight: 600;
    font-size: var(--font-size-sm);
    color: #1f2937;
    margin-bottom: 4px;
}

.journey-video-meta {
    font-size: var(--font-size-xs);
    color: #6b7280;
}

/* Line clamp utility */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========================================
   Week Detail Page Styles
   ======================================== */

/* Week Header */
.week-detail-header {
    display: flex;
    align-items: center;
    padding: 16px;
    background: linear-gradient(135deg, var(--color-primary) 0%, #6d28d9 100%);
    color: white;
    position: sticky;
    top: 0;
    z-index: 40;
}

.week-header-back {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    color: white;
    transition: background-color var(--transition-fast);
    flex-shrink: 0;
}

.week-header-back:active {
    background-color: rgba(255, 255, 255, 0.2);
}

.week-header-info {
    flex: 1;
    text-align: center;
    min-width: 0;
}

.week-header-info h1 {
    font-size: var(--font-size-lg);
    font-weight: 700;
    margin: 0;
}

.week-header-info p {
    font-size: var(--font-size-sm);
    opacity: 0.9;
    margin: 2px 0 0;
}

.week-header-stars {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
}

/* Week Info Bar */
.week-info-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    font-size: var(--font-size-sm);
}

.week-status-badge {
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 600;
}

.week-status-badge.current {
    background: #ede9fe;
    color: var(--color-primary);
}

.week-status-badge.completed {
    background: #d1fae5;
    color: #059669;
}

.week-status-badge.past {
    background: #f3f4f6;
    color: #6b7280;
}

/* Tab Content Area */
.week-tab-content-area {
    flex: 1;
    overflow-y: auto;
    padding-bottom: calc(var(--bottom-nav-height) + 80px);
}

.week-tab-content {
    display: none;
}

.week-tab-content.active {
    display: block;
}

/* Tool Tabs Bar */
.week-tool-tabs {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: var(--mobile-width);
    max-width: 100%;
    height: var(--bottom-nav-height);
    background: white;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 50;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

@media (max-width: 767px) {
    .week-tool-tabs {
        left: 0;
        transform: none;
        width: 100%;
    }
}

.week-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 8px;
    color: #6b7280;
    background: none;
    border: none;
    cursor: pointer;
    transition: color var(--transition-fast);
    min-width: 56px;
    position: relative;
}

.week-tab.active {
    color: var(--color-primary);
}

.week-tab:active {
    opacity: 0.7;
}

.week-tab i,
.week-tab svg {
    width: 22px;
    height: 22px;
    margin-bottom: 2px;
}

.week-tab span:not(.week-tab-badge) {
    font-size: 10px;
    font-weight: 500;
}

.week-tab-badge {
    position: absolute;
    top: 2px;
    right: 8px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: #ef4444;
    color: white;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.week-tab-badge.hidden {
    display: none;
}

/* Doctor availability dot in week tabs */
.week-tab .doctor-available-dot {
    position: absolute;
    top: 0;
    right: 6px;
    width: 6px;
    height: 6px;
    border-width: 1px;
}

/* Complete Week FAB */
.week-complete-fab {
    position: fixed;
    bottom: calc(var(--bottom-nav-height) + 16px);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--color-primary) 0%, #6d28d9 100%);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.4);
    cursor: pointer;
    z-index: 45;
    transition: all var(--transition-fast);
}

.week-complete-fab:hover {
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.5);
}

.week-complete-fab:active {
    transform: translateX(-50%) translateY(0);
}

.week-complete-fab.completed {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
    cursor: default;
}

.week-complete-fab.hidden {
    display: none;
}

.week-complete-fab i,
.week-complete-fab svg {
    width: 20px;
    height: 20px;
}

/* Inline Form Styles */
.growth-form-chevron {
    transition: transform var(--transition-fast);
}

/* Milestone Item */
.milestone-item {
    transition: opacity var(--transition-fast);
}

.milestone-item.hidden {
    display: none;
}

/* ========================================
   Doctor CTA Banner Styles
   ======================================== */

/* Doctor CTA Banner */
.doctor-cta-banner {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    border: 1px solid #ddd6fe;
    border-radius: var(--radius-xl);
    padding: 16px;
    margin: 16px 0;
}

.doctor-cta-banner.compact {
    padding: 12px;
}

.doctor-cta-banner.urgent {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #fcd34d;
}

/* Tip Doctor CTA */
.tip-doctor-cta {
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* Chatbot Doctor Suggestion */
.chatbot-doctor-suggestion {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: var(--radius-lg);
    padding: 12px;
    margin-top: 8px;
}

/* Video Doctor CTA */
.video-doctor-cta {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    border: 1px solid #ddd6fe;
    border-radius: var(--radius-xl);
    padding: 16px;
    margin-top: 16px;
}

/* Quick Action Doctor Button */
.quick-action-doctor {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    border: 1px solid #ddd6fe;
    position: relative;
}

.quick-action-doctor::after {
    content: '24x7';
    position: absolute;
    top: 4px;
    right: 4px;
    background: #7c3aed;
    color: white;
    font-size: 8px;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 4px;
}

/* Doctor Avatar Ring */
.doctor-avatar-ring {
    border: 2px solid #7c3aed;
    padding: 2px;
    border-radius: 50%;
}

/* ========================================
   Doctor Nav Availability Dot
   ======================================== */

.bottom-nav-icon-wrapper {
    position: relative;
    display: inline-flex;
}

.doctor-available-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    border: 2px solid white;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

/* ========================================
   Header Avatar for Profile Access
   ======================================== */

.header-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary) 0%, #6d28d9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.header-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
}

.header-avatar:active {
    transform: scale(0.95);
}

.header-avatar-initial {
    color: white;
    font-size: var(--font-size-sm);
    font-weight: 600;
    line-height: 1;
}

/* ========================================
   Severity Button Styles (Track Tab Drawer)
   ======================================== */

.severity-btn {
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.severity-btn.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.severity-btn:hover:not(.active) {
    border-color: var(--color-primary);
}

/* ========================================
   Phase 10: Polish Styles
   ======================================== */

/* Error State */
.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-2xl) var(--spacing-lg);
    text-align: center;
}

.error-state-icon {
    width: 80px;
    height: 80px;
    background: #fee2e2;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-danger);
    margin-bottom: var(--spacing-md);
}

.error-state-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: #374151;
    margin-bottom: var(--spacing-xs);
}

.error-state-message {
    font-size: var(--font-size-sm);
    color: #6b7280;
}

/* Loading Spinner */
.spinner {
    border: 3px solid #e5e7eb;
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner-sm {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

.spinner-md {
    width: 32px;
    height: 32px;
}

.spinner-lg {
    width: 48px;
    height: 48px;
    border-width: 4px;
}

.spinner-inline {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
}

.spinner-fullscreen {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    z-index: 100;
}

.spinner-text {
    margin-top: var(--spacing-md);
    font-size: var(--font-size-sm);
    color: #6b7280;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    z-index: 200;
    animation: fade-in 0.2s ease;
}

.loading-overlay.fade-out {
    animation: fade-out 0.2s ease forwards;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
}

.loading-text {
    font-size: var(--font-size-sm);
    color: #6b7280;
    font-weight: 500;
}

@keyframes fade-out {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* Confirm Dialog */
.confirm-dialog-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
    animation: fade-in 0.2s ease;
    padding: var(--spacing-md);
}

.confirm-dialog-overlay.fade-out {
    animation: fade-out 0.2s ease forwards;
}

.confirm-dialog {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    max-width: 320px;
    width: 100%;
    text-align: center;
    animation: scale-in 0.2s ease;
}

@keyframes scale-in {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.confirm-dialog-icon {
    width: 64px;
    height: 64px;
    background: #fef3c7;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-warning);
    margin: 0 auto var(--spacing-md);
}

.confirm-dialog-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: #1f2937;
    margin-bottom: var(--spacing-xs);
}

.confirm-dialog-message {
    font-size: var(--font-size-sm);
    color: #6b7280;
    margin-bottom: var(--spacing-lg);
}

.confirm-dialog-actions {
    display: flex;
    gap: var(--spacing-sm);
}

.confirm-dialog-actions .btn {
    flex: 1;
}

/* List Animation */
.animate-in {
    animation: animate-in 0.3s ease forwards;
    opacity: 0;
}

@keyframes animate-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Skeleton List Items */
.skeleton-list-item {
    display: flex;
    align-items: center;
    padding: var(--spacing-md);
    background: white;
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-sm);
}

.skeleton-video-card {
    margin-bottom: var(--spacing-md);
}

/* Pull to Refresh */
.pull-refresh-indicator {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%) translateY(-60px);
    width: 40px;
    height: 40px;
    background: white;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    transition: opacity 0.2s ease;
    z-index: 100;
    opacity: 0;
}

.pull-refresh-indicator.refreshing {
    animation: spin 0.8s linear infinite;
    opacity: 1;
    transform: translateX(-50%) translateY(20px);
}

/* Ripple Effect */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Network Status */
.network-status {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background: #374151;
    color: white;
    font-size: var(--font-size-sm);
    font-weight: 500;
    z-index: 200;
    animation: slide-down 0.3s ease;
}

.network-status.hidden {
    display: none;
}

@keyframes slide-down {
    from {
        transform: translateX(-50%) translateY(-100%);
    }
    to {
        transform: translateX(-50%) translateY(0);
    }
}

/* Touch Feedback */
.touchable {
    transition: transform var(--transition-fast), opacity var(--transition-fast);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.touchable:active {
    transform: scale(0.98);
    opacity: 0.8;
}

/* Card Hover/Active States */
.card-interactive {
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    cursor: pointer;
}

.card-interactive:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.card-interactive:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

/* Page Transitions */
.page-enter {
    animation: page-enter 0.3s ease forwards;
}

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

.page-exit {
    animation: page-exit 0.2s ease forwards;
}

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

/* Staggered List Animation */
.stagger-item {
    opacity: 0;
    animation: stagger-in 0.4s ease forwards;
}

.stagger-item:nth-child(1) { animation-delay: 0ms; }
.stagger-item:nth-child(2) { animation-delay: 50ms; }
.stagger-item:nth-child(3) { animation-delay: 100ms; }
.stagger-item:nth-child(4) { animation-delay: 150ms; }
.stagger-item:nth-child(5) { animation-delay: 200ms; }
.stagger-item:nth-child(6) { animation-delay: 250ms; }
.stagger-item:nth-child(7) { animation-delay: 300ms; }
.stagger-item:nth-child(8) { animation-delay: 350ms; }

@keyframes stagger-in {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Shimmer Effect for Skeletons */
.skeleton-shimmer {
    position: relative;
    overflow: hidden;
}

.skeleton-shimmer::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.5),
        transparent
    );
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Success Checkmark Animation */
.success-checkmark {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--color-success);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: success-pop 0.4s ease;
}

.success-checkmark svg {
    width: 32px;
    height: 32px;
    color: white;
    animation: checkmark-draw 0.3s ease 0.2s forwards;
    stroke-dasharray: 50;
    stroke-dashoffset: 50;
}

@keyframes success-pop {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes checkmark-draw {
    to {
        stroke-dashoffset: 0;
    }
}

/* Number Counter Animation */
.counter-animate {
    animation: counter-pop 0.3s ease;
}

@keyframes counter-pop {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* Notification Badge Bounce */
.badge-bounce {
    animation: badge-bounce 0.5s ease;
}

@keyframes badge-bounce {
    0%, 100% {
        transform: scale(1);
    }
    30% {
        transform: scale(1.3);
    }
    60% {
        transform: scale(0.9);
    }
}

/* Floating Label Input */
.floating-label-group {
    position: relative;
    margin-top: var(--spacing-md);
}

.floating-label-input {
    width: 100%;
    padding: var(--spacing-md) var(--spacing-md) var(--spacing-xs);
    font-size: var(--font-size-base);
    border: 1px solid #d1d5db;
    border-radius: var(--radius-lg);
    outline: none;
    transition: border-color var(--transition-fast);
}

.floating-label-input:focus {
    border-color: var(--color-primary);
}

.floating-label {
    position: absolute;
    left: var(--spacing-md);
    top: 50%;
    transform: translateY(-50%);
    font-size: var(--font-size-base);
    color: #9ca3af;
    pointer-events: none;
    transition: all var(--transition-fast);
}

.floating-label-input:focus + .floating-label,
.floating-label-input:not(:placeholder-shown) + .floating-label {
    top: 8px;
    font-size: var(--font-size-xs);
    color: var(--color-primary);
}

/* Focus Ring */
.focus-ring:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}

/* Disabled State */
.disabled,
[disabled] {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}
