@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Dark Slate Color Palette - Premium Professional Theme */
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --slate-950: #020617;

    /* Accent Colors - Refined for Slate */
    --primary: #0ea5e9;
    --primary-hover: #0284c7;
    --primary-light: #38bdf8;
    --secondary: #8b5cf6;
    --success: #10b981;
    --success-hover: #059669;
    --warning: #f59e0b;
    --warning-hover: #d97706;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --info: #06b6d4;

    /* Background Colors - Dark Slate Theme */
    --bg-app: linear-gradient(to bottom, #020617, #0f172a);
    --bg-solid: #020617;
    --bg-card: #0f172a;
    --bg-card-elevated: #1e293b;
    --bg-input: #0a1120;
    --bg-hover: #1e293b;
    --bg-elevated: #1e293b;

    /* Text Colors - WCAG AA Compliant on Slate */
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-on-primary: #ffffff;
    --text-accent: #38bdf8;

    /* Border Colors */
    --border: #1e293b;
    --border-hover: #334155;
    --border-focus: #0ea5e9;
    --border-subtle: #0f172a;

    /* Shadows - Deeper for Slate */
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.5);
    --shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.6);
    --shadow-md: 0 4px 10px 0 rgba(0, 0, 0, 0.7);
    --shadow-lg: 0 8px 20px 0 rgba(0, 0, 0, 0.8);
    --shadow-xl: 0 16px 32px 0 rgba(0, 0, 0, 0.9);

    /* Glows for Slate */
    --glow-primary: 0 0 20px rgba(14, 165, 233, 0.15);
    --glow-success: 0 0 20px rgba(16, 185, 129, 0.15);
    --glow-warning: 0 0 20px rgba(245, 158, 11, 0.15);
    --glow-danger: 0 0 20px rgba(239, 68, 68, 0.15);

    /* Spacing */
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;

    /* Transitions */
    --transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    font-size: 16px;
}

html, body {
    height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
    background: var(--bg-app);
    color: var(--text-primary);
    padding: clamp(16px, 3vw, 32px);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(14, 165, 233, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Smooth Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

@keyframes gentlePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: var(--shadow-lg), var(--glow-primary);
    }
    50% {
        transform: scale(1.01);
        box-shadow: var(--shadow-xl), 0 0 30px rgba(14, 165, 233, 0.25);
    }
}

@keyframes countdownGlow {
    0%, 100% {
        border-color: rgba(139, 92, 246, 0.4);
        box-shadow:
            0 4px 20px rgba(139, 92, 246, 0.15),
            0 0 30px rgba(14, 165, 233, 0.1),
            inset 0 2px 4px rgba(0, 0, 0, 0.4);
    }
    50% {
        border-color: rgba(14, 165, 233, 0.5);
        box-shadow:
            0 4px 25px rgba(139, 92, 246, 0.25),
            0 0 40px rgba(14, 165, 233, 0.2),
            inset 0 2px 4px rgba(0, 0, 0, 0.4);
    }
}

/* Main Container */
.app-container {
    max-width: 800px;
    margin: 0 auto;
    animation: fadeIn 0.4s ease-out;
}

.main-container {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: clamp(24px, 4vw, 40px);
    margin-bottom: 24px;
    border: 1px solid var(--border);
    transition: all var(--transition-slow);
    position: relative;
}

.main-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.5;
}

.main-container:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl), var(--glow-primary);
    border-color: var(--border-hover);
}

/* Header Section */
.app-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--border);
}

.app-icon {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    box-shadow: var(--shadow-md), var(--glow-primary);
    border: 2px solid var(--border-hover);
}

.app-title {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

/* Current Time Display */
#currentTime {
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
    margin: 24px 0;
    padding: 16px;
    background: var(--bg-card-elevated);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* Form Section */
.form-section {
    background: var(--bg-input);
    border-radius: var(--radius-lg);
    padding: clamp(20px, 3vw, 32px);
    margin-bottom: 24px;
    border: 2px solid var(--border);
    transition: border-color var(--transition);
    box-shadow: var(--shadow);
}

.form-row {
    margin-bottom: 24px;
}

label {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 0.9375rem;
    letter-spacing: 0.01em;
}

.field-help {
    display: block;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 6px;
    line-height: 1.5;
}

/* Input Fields - Dark Slate Theme */
input, select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 500;
    background: var(--bg-card-elevated);
    color: var(--text-primary);
    transition: all var(--transition);
    font-family: inherit;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

input::placeholder {
    color: var(--text-muted);
}

input:hover, select:hover {
    border-color: var(--border-hover);
}

input:focus, select:focus {
    outline: none;
    border-color: var(--border-focus);
    background: var(--bg-hover);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15), var(--glow-primary);
}

select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%230ea5e9' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 14px center;
    background-repeat: no-repeat;
    background-size: 18px;
    padding-right: 48px;
}

input[type="text"] {
    text-transform: uppercase;
    text-align: center;
    font-weight: 700;
    letter-spacing: 0.15em;
}

/* Reminder Grid */
.reminder-section {
    margin-bottom: 24px;
}

.reminder-section > label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.selected-count {
    font-size: 0.875rem;
    color: var(--primary-light);
    font-weight: 600;
    background: rgba(14, 165, 233, 0.12);
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid rgba(14, 165, 233, 0.25);
}

.reminder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(75px, 1fr));
    gap: 10px;
}

.reminder-item {
    position: relative;
}

.reminder-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

.reminder-item label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 12px;
    background: var(--bg-card-elevated);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 600;
    min-height: 52px;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.reminder-item label:hover {
    background: var(--bg-hover);
    border-color: var(--border-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.reminder-item input[type="checkbox"]:checked + label {
    background: rgba(14, 165, 233, 0.15);
    border-color: var(--primary);
    color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1), var(--shadow);
}

.checkmark {
    position: absolute;
    top: 6px;
    right: 6px;
    background: var(--success);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

.reminder-item input[type="checkbox"]:checked + label .checkmark {
    display: flex;
}

/* Warning Section */
.warning-section {
    margin-bottom: 24px;
}

.warning-section label {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: rgba(245, 158, 11, 0.08);
    border-radius: var(--radius-lg);
    border: 2px solid rgba(245, 158, 11, 0.25);
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: var(--shadow-sm);
}

.warning-section label:hover {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.35);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.three-minute-checkbox {
    appearance: none;
    width: 24px;
    height: 24px;
    border: 2px solid var(--warning);
    border-radius: var(--radius-sm);
    background: var(--bg-card-elevated);
    cursor: pointer;
    position: relative;
    transition: all var(--transition);
    flex-shrink: 0;
}

.three-minute-checkbox:hover {
    border-color: var(--warning-hover);
}

.three-minute-checkbox:checked {
    background: var(--warning);
    border-color: var(--warning);
}

.three-minute-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: 900;
}

.checkbox-label {
    font-weight: 600;
    color: var(--text-primary);
    user-select: none;
}

/* Volume Controls */
.volume-section {
    margin-bottom: 24px;
}

.volume-section > label {
    margin-bottom: 12px;
}

.volume-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-card-elevated);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.volume-controls label {
    min-width: 70px;
    margin: 0;
    font-weight: 600;
    color: var(--text-secondary);
}

.volume-slider {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    background: var(--bg-input);
    outline: none;
    -webkit-appearance: none;
    border: 1px solid var(--border);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: var(--shadow);
    border: 2px solid var(--slate-100);
    transition: all var(--transition);
}

.volume-slider::-webkit-slider-thumb:hover {
    background: var(--primary-hover);
    transform: scale(1.1);
    box-shadow: var(--shadow-md), var(--glow-primary);
}

.volume-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: 2px solid var(--slate-100);
    box-shadow: var(--shadow);
}

#volumeValue {
    min-width: 50px;
    text-align: right;
    color: var(--primary-light);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* Buttons */
.button-container {
    display: flex;
    gap: 12px;
}

.add-button {
    flex: 1;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: var(--text-on-primary);
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1.0625rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: var(--shadow-md), var(--glow-primary);
    letter-spacing: 0.02em;
}

.add-button:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, #0369a1 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(14, 165, 233, 0.3);
}

.add-button:active {
    transform: translateY(0);
    box-shadow: var(--shadow);
}

.add-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Appointments List */
.appointments-section {
    margin-top: 24px;
}

.appointment {
    background: var(--bg-card);
    padding: clamp(20px, 3vw, 28px);
    margin-bottom: 20px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    border: 2px solid var(--border);
    transition: all var(--transition-slow);
    position: relative;
}

.appointment::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-light), transparent);
    opacity: 0.3;
}

.appointment:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl), var(--glow-primary);
    border-color: var(--border-hover);
}

.appointment.in-countdown {
    border-color: var(--warning);
    animation: gentlePulse 3s ease-in-out infinite;
}

.appointment-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 16px;
}

.appointment-details {
    flex: 1;
}

.appointment-title {
    font-size: 1.375rem;
    font-weight: 800;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.01em;
}

.type-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    font-weight: 800;
    font-size: 0.875rem;
    box-shadow: var(--shadow), var(--glow-primary);
    border: 2px solid var(--bg-card);
}

.appointment-timing {
    background: var(--bg-card-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin: 16px 0;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.timing-row {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.timing-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.timing-label {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9375rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.timing-value {
    color: var(--text-accent);
    font-weight: 700;
    font-family: 'SF Mono', 'Roboto Mono', monospace;
    font-size: 0.9375rem;
    font-variant-numeric: tabular-nums;
}

/* Countdown Display - Slate Theme */
.countdown-container {
    display: flex;
    height: 70px;
    background: var(--bg-input);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 20px;
    border: 2px solid rgba(139, 92, 246, 0.4);
    box-shadow:
        0 4px 20px rgba(139, 92, 246, 0.15),
        0 0 30px rgba(14, 165, 233, 0.1),
        inset 0 2px 4px rgba(0, 0, 0, 0.4);
    animation: countdownGlow 3s ease-in-out infinite;
}

.countdown-segment {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: 800;
    transition: background var(--transition-slow);
    position: relative;
}

.countdown-segment::after {
    content: '';
    position: absolute;
    right: 0;
    top: 10%;
    bottom: 10%;
    width: 1px;
    background: rgba(255, 255, 255, 0.15);
}

.countdown-segment:last-child::after {
    display: none;
}

.hours {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    box-shadow: inset 0 0 20px rgba(139, 92, 246, 0.3);
}

.minutes {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    box-shadow: inset 0 0 20px rgba(14, 165, 233, 0.3);
}

.seconds {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: inset 0 0 20px rgba(16, 185, 129, 0.3);
}

.countdown-number {
    font-size: 1.75rem;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.countdown-label {
    font-size: 0.75rem;
    opacity: 0.95;
    text-transform: uppercase;
    margin-top: 4px;
    letter-spacing: 0.08em;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.countdown-text {
    text-align: center;
    font-size: 2.25rem;
    font-weight: 900;
    margin: 20px 0;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.countdown-text.urgent {
    background: linear-gradient(135deg, var(--danger) 0%, #f87171 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulse 1.2s ease-in-out infinite;
}

.countdown-text.warning {
    background: linear-gradient(135deg, var(--warning) 0%, #fbbf24 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Appointment Buttons */
.appointment-buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.remove-btn {
    padding: 12px 18px;
    border: none;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow);
    white-space: nowrap;
    background: linear-gradient(135deg, var(--danger) 0%, var(--danger-hover) 100%);
    color: white;
}

.remove-btn:hover {
    background: linear-gradient(135deg, var(--danger-hover) 0%, #b91c1c 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--glow-danger);
}

/* Timer Hub Widget */
.timer-hub-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
}

.timer-hub-fab {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: 3px solid var(--bg-solid);
    box-shadow: var(--shadow-xl), var(--glow-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    transition: all var(--transition-slow);
}

.timer-hub-fab:hover {
    transform: scale(1.08);
    box-shadow: var(--shadow-xl), 0 0 30px rgba(14, 165, 233, 0.4);
    background: linear-gradient(135deg, var(--primary-hover) 0%, #7c3aed 100%);
}

.timer-hub-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: linear-gradient(135deg, var(--danger) 0%, #f87171 100%);
    color: white;
    border-radius: 50%;
    min-width: 26px;
    height: 26px;
    font-size: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--bg-solid);
    transform: scale(0);
    transition: transform var(--transition);
    box-shadow: var(--shadow-md), var(--glow-danger);
}

.timer-hub-badge.visible {
    transform: scale(1);
}

.timer-hub-panel {
    position: absolute;
    top: 78px;
    right: 0;
    width: 340px;
    max-height: calc(100vh - 140px);
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 2px solid var(--border);
    box-shadow: var(--shadow-xl), var(--glow-primary);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: all var(--transition-slow);
}

.timer-hub-panel.expanded {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.timer-hub-panel-header {
    padding: 20px 24px;
    border-bottom: 2px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card-elevated);
}

.timer-hub-panel-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.timer-hub-close {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 24px;
    padding: 6px 10px;
    border-radius: var(--radius);
    transition: all var(--transition);
    line-height: 1;
}

.timer-hub-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.timer-hub-list {
    max-height: calc(100vh - 220px);
    overflow-y: auto;
    padding: 8px;
}

.timer-hub-list::-webkit-scrollbar {
    width: 8px;
}

.timer-hub-list::-webkit-scrollbar-track {
    background: var(--bg-input);
    border-radius: 4px;
}

.timer-hub-list::-webkit-scrollbar-thumb {
    background: var(--border-hover);
    border-radius: 4px;
}

.timer-hub-list::-webkit-scrollbar-thumb:hover {
    background: var(--slate-500);
}

.timer-hub-item {
    padding: 16px;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition);
    margin-bottom: 8px;
    border: 1px solid transparent;
}

.timer-hub-item:hover {
    background: var(--bg-card-elevated);
    border-color: var(--border);
}

.timer-hub-item-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.timer-hub-item-time {
    font-size: 1.5rem;
    font-weight: 800;
    font-family: 'SF Mono', monospace;
    font-variant-numeric: tabular-nums;
    color: var(--text-accent);
}

.timer-hub-item.urgent {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
}

.timer-hub-item.urgent .timer-hub-item-time {
    color: var(--danger);
}

.timer-hub-item.warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
}

.timer-hub-item.warning .timer-hub-item-time {
    color: var(--warning);
}

/* Please Read Drawer */
.please-read-container {
    margin: 24px 0;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border: 2px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.please-read-toggle {
    width: 100%;
    padding: 18px 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all var(--transition);
}

.please-read-toggle:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, #7c3aed 100%);
}

.toggle-arrow {
    transition: transform var(--transition-slow);
    font-size: 1.125rem;
}

.toggle-arrow.rotated {
    transform: rotate(180deg);
}

.please-read-content {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: all var(--transition-slow);
    background: var(--bg-card-elevated);
}

.please-read-content.expanded {
    max-height: 500px;
    padding: 24px;
    overflow-y: auto;
}

.please-read-content p {
    margin-bottom: 16px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.please-read-content p:last-child {
    margin-bottom: 0;
}

.please-read-content strong {
    color: var(--primary-light);
    font-weight: 700;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 16px;
    }

    .main-container {
        padding: 24px;
    }

    .app-header {
        flex-direction: column;
        gap: 16px;
    }

    .app-title {
        font-size: 1.75rem;
        text-align: center;
    }

    .reminder-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .timing-row {
        grid-template-columns: 130px 1fr;
        gap: 12px;
    }

    .appointment-info {
        flex-direction: column;
    }

    .appointment-buttons {
        width: 100%;
        justify-content: stretch;
    }

    .remove-btn {
        flex: 1;
    }

    .countdown-number {
        font-size: 1.5rem;
    }

    .countdown-label {
        font-size: 0.7rem;
    }

    .timer-hub-container {
        top: 16px;
        right: 16px;
    }

    .timer-hub-fab {
        width: 56px;
        height: 56px;
        font-size: 24px;
    }

    .timer-hub-panel {
        width: calc(100vw - 48px);
        max-width: 320px;
    }
}

@media (max-width: 480px) {
    .app-title {
        font-size: 1.5rem;
    }

    .reminder-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .countdown-container {
        height: 60px;
    }

    .countdown-number {
        font-size: 1.25rem;
    }
}

/* Focus States - WCAG AAA */
button:focus-visible,
input:focus-visible,
select:focus-visible,
.reminder-item input:focus-visible + label {
    outline: 3px solid var(--primary-light);
    outline-offset: 3px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --border: #475569;
        --text-primary: #ffffff;
        --text-secondary: #e2e8f0;
        --primary: #38bdf8;
    }
}
