/* Base styles */

/* CSS Variables for Theming */
:root {
    /* Light Theme (Default) */
    --primary-color: #6366f1;
    --primary-hover: #5855eb;
    --secondary-color: #8b5cf6;
    --accent-color: #06b6d4;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-inverse: #ffffff;
    
    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;
    --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);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-secondary: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    --gradient-accent: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
}

/* Dark Theme */
[data-theme="dark"] {
    --primary-color: #60a5fa;
    --primary-hover: #3b82f6;
    --secondary-color: #818cf8;
    --accent-color: #06b6d4;
    --success-color: #34d399;
    --warning-color: #fbbf24;
    --error-color: #f87171;
    
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-card: #1e293b;
    --bg-input: #334155;
    
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-inverse: #0f172a;
    
    --border-color: #334155;
    --border-hover: #475569;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.3), 0 8px 10px -6px rgb(0 0 0 / 0.3);
    
    --gradient-primary: linear-gradient(135deg, #60a5fa 0%, #818cf8 100%);
    --gradient-secondary: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    --gradient-accent: linear-gradient(135deg, #fbbf24 0%, #f87171 100%);
}

/* Light Theme (Clean and Bright) */
[data-theme="light"] {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --secondary-color: #6366f1;
    --accent-color: #06b6d4;
    --success-color: #059669;
    --warning-color: #d97706;
    --error-color: #dc2626;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-inverse: #ffffff;
    
    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;
    --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);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    --gradient-secondary: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    --gradient-accent: linear-gradient(135deg, #d97706 0%, #dc2626 100%);
}

/* Ocean Theme */
[data-theme="ocean"] {
    --primary-color: #0891b2;
    --primary-hover: #0e7490;
    --secondary-color: #06b6d4;
    --accent-color: #22d3ee;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    
    --bg-primary: #f0f9ff;
    --bg-secondary: #e0f2fe;
    --bg-tertiary: #bae6fd;
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    
    --text-primary: #0c4a6e;
    --text-secondary: #0369a1;
    --text-muted: #0284c7;
    --text-inverse: #ffffff;
    
    --border-color: #7dd3fc;
    --border-hover: #38bdf8;
    --shadow-sm: 0 1px 2px 0 rgb(8 145 178 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(8 145 178 / 0.1), 0 2px 4px -2px rgb(8 145 178 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(8 145 178 / 0.1), 0 4px 6px -4px rgb(8 145 178 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(8 145 178 / 0.1), 0 8px 10px -6px rgb(8 145 178 / 0.1);
    
    --gradient-primary: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%);
    --gradient-secondary: linear-gradient(135deg, #22d3ee 0%, #67e8f9 100%);
    --gradient-accent: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
}

/* Forest Theme (Light) */
[data-theme="forest"] {
    --primary-color: #059669;
    --primary-hover: #047857;
    --secondary-color: #10b981;
    --accent-color: #34d399;
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    
    --bg-primary: #f0fdf4;
    --bg-secondary: #dcfce7;
    --bg-tertiary: #bbf7d0;
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    
    --text-primary: #14532d;
    --text-secondary: #166534;
    --text-muted: #15803d;
    --text-inverse: #ffffff;
    
    --border-color: #86efac;
    --border-hover: #4ade80;
    --shadow-sm: 0 1px 2px 0 rgb(5 150 105 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(5 150 105 / 0.1), 0 2px 4px -2px rgb(5 150 105 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(5 150 105 / 0.1), 0 4px 6px -4px rgb(5 150 105 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(5 150 105 / 0.1), 0 8px 10px -6px rgb(5 150 105 / 0.1);
    
    --gradient-primary: linear-gradient(135deg, #059669 0%, #10b981 100%);
    --gradient-secondary: linear-gradient(135deg, #34d399 0%, #6ee7b7 100%);
    --gradient-accent: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
}

/* Sunset Theme */
[data-theme="sunset"] {
    --primary-color: #dc2626;
    --primary-hover: #b91c1c;
    --secondary-color: #ea580c;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --warning-color: #fbbf24;
    --error-color: #ef4444;
    
    --bg-primary: #fef2f2;
    --bg-secondary: #fecaca;
    --bg-tertiary: #fca5a5;
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    
    --text-primary: #7f1d1d;
    --text-secondary: #991b1b;
    --text-muted: #b91c1c;
    --text-inverse: #ffffff;
    
    --border-color: #fca5a5;
    --border-hover: #f87171;
    --shadow-sm: 0 1px 2px 0 rgb(220 38 38 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(220 38 38 / 0.1), 0 2px 4px -2px rgb(220 38 38 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(220 38 38 / 0.1), 0 4px 6px -4px rgb(220 38 38 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(220 38 38 / 0.1), 0 8px 10px -6px rgb(220 38 38 / 0.1);
    
    --gradient-primary: linear-gradient(135deg, #dc2626 0%, #ea580c 100%);
    --gradient-secondary: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    --gradient-accent: linear-gradient(135deg, #10b981 0%, #ef4444 100%);
}

/* Midnight Theme (Dark) */
[data-theme="midnight"] {
    --primary-color: #8b5cf6;
    --primary-hover: #7c3aed;
    --secondary-color: #a855f7;
    --accent-color: #06b6d4;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-card: #1e293b;
    --bg-input: #334155;
    
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-inverse: #0f172a;
    
    --border-color: #334155;
    --border-hover: #475569;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.3), 0 8px 10px -6px rgb(0 0 0 / 0.3);
    
    --gradient-primary: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
    --gradient-secondary: linear-gradient(135deg, #06b6d4 0%, #6366f1 100%);
    --gradient-accent: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
}

/* Desert Theme (Dark) */
[data-theme="desert"] {
    --primary-color: #f59e0b;
    --primary-hover: #d97706;
    --secondary-color: #fbbf24;
    --accent-color: #fcd34d;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    
    --bg-primary: #1c1917;
    --bg-secondary: #292524;
    --bg-tertiary: #44403c;
    --bg-card: #292524;
    --bg-input: #44403c;
    
    --text-primary: #fafaf9;
    --text-secondary: #d6d3d1;
    --text-muted: #a8a29e;
    --text-inverse: #1c1917;
    
    --border-color: #44403c;
    --border-hover: #57534e;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.3), 0 8px 10px -6px rgb(0 0 0 / 0.3);
    
    --gradient-primary: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    --gradient-secondary: linear-gradient(135deg, #fcd34d 0%, #fde68a 100%);
    --gradient-accent: linear-gradient(135deg, #10b981 0%, #ef4444 100%);
}

/* Purple Theme (Dark) */
[data-theme="purple"] {
    --primary-color: #a855f7;
    --primary-hover: #9333ea;
    --secondary-color: #c084fc;
    --accent-color: #d8b4fe;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    
    --bg-primary: #1a1625;
    --bg-secondary: #2d1b69;
    --bg-tertiary: #4c1d95;
    --bg-card: #2d1b69;
    --bg-input: #4c1d95;
    
    --text-primary: #faf5ff;
    --text-secondary: #e9d5ff;
    --text-muted: #c4b5fd;
    --text-inverse: #1a1625;
    
    --border-color: #4c1d95;
    --border-hover: #6d28d9;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.3), 0 8px 10px -6px rgb(0 0 0 / 0.3);
    
    --gradient-primary: linear-gradient(135deg, #a855f7 0%, #c084fc 100%);
    --gradient-secondary: linear-gradient(135deg, #d8b4fe 0%, #e9d5ff 100%);
    --gradient-accent: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
}

/* Rose Theme (Dark) */
[data-theme="rose-dark"] {
    --primary-color: #f43f5e;
    --primary-hover: #e11d48;
    --secondary-color: #fb7185;
    --accent-color: #fda4af;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    
    --bg-primary: #1f1f23;
    --bg-secondary: #2d1b2e;
    --bg-tertiary: #4c1d3f;
    --bg-card: #2d1b2e;
    --bg-input: #4c1d3f;
    
    --text-primary: #fff1f2;
    --text-secondary: #ffe4e6;
    --text-muted: #fecdd3;
    --text-inverse: #1f1f23;
    
    --border-color: #4c1d3f;
    --border-hover: #6d1b3f;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.3), 0 8px 10px -6px rgb(0 0 0 / 0.3);
    
    --gradient-primary: linear-gradient(135deg, #f43f5e 0%, #fb7185 100%);
    --gradient-secondary: linear-gradient(135deg, #fda4af 0%, #ffe4e6 100%);
    --gradient-accent: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
}

/* Slate Theme */
[data-theme="slate"] {
    --primary-color: #475569;
    --primary-hover: #334155;
    --secondary-color: #64748b;
    --accent-color: #94a3b8;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    
    --bg-primary: #f8fafc;
    --bg-secondary: #f1f5f9;
    --bg-tertiary: #e2e8f0;
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    
    --text-primary: #1e293b;
    --text-secondary: #334155;
    --text-muted: #475569;
    --text-inverse: #ffffff;
    
    --border-color: #cbd5e1;
    --border-hover: #94a3b8;
    --shadow-sm: 0 1px 2px 0 rgb(71 85 105 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(71 85 105 / 0.1), 0 2px 4px -2px rgb(71 85 105 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(71 85 105 / 0.1), 0 4px 6px -4px rgb(71 85 105 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(71 85 105 / 0.1), 0 8px 10px -6px rgb(71 85 105 / 0.1);
    
    --gradient-primary: linear-gradient(135deg, #475569 0%, #64748b 100%);
    --gradient-secondary: linear-gradient(135deg, #94a3b8 0%, #cbd5e1 100%);
    --gradient-accent: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
}

/* New Themes */

/* Emerald Theme (Dark) */
[data-theme="emerald"] {
    --primary-color: #34d399;
    --primary-hover: #10b981;
    --secondary-color: #6ee7b7;
    --accent-color: #a7f3d0;
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    
    --bg-primary: #064e3b;
    --bg-secondary: #065f46;
    --bg-tertiary: #047857;
    --bg-card: #065f46;
    --bg-input: #047857;
    
    --text-primary: #ecfdf5;
    --text-secondary: #d1fae5;
    --text-muted: #a7f3d0;
    --text-inverse: #064e3b;
    
    --border-color: #047857;
    --border-hover: #059669;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.3), 0 8px 10px -6px rgb(0 0 0 / 0.3);
    
    --gradient-primary: linear-gradient(135deg, #34d399 0%, #6ee7b7 100%);
    --gradient-secondary: linear-gradient(135deg, #a7f3d0 0%, #d1fae5 100%);
    --gradient-accent: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
}

/* Indigo Theme (Dark) */
[data-theme="indigo"] {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #6366f1;
    --accent-color: #818cf8;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    
    --bg-primary: #1e1b4b;
    --bg-secondary: #312e81;
    --bg-tertiary: #4338ca;
    --bg-card: #312e81;
    --bg-input: #4338ca;
    
    --text-primary: #eef2ff;
    --text-secondary: #e0e7ff;
    --text-muted: #c7d2fe;
    --text-inverse: #1e1b4b;
    
    --border-color: #4338ca;
    --border-hover: #4f46e5;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.3), 0 8px 10px -6px rgb(0 0 0 / 0.3);
    
    --gradient-primary: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    --gradient-secondary: linear-gradient(135deg, #818cf8 0%, #a5b4fc 100%);
    --gradient-accent: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
}

/* Amber Theme (Light) */
[data-theme="amber"] {
    --primary-color: #f59e0b;
    --primary-hover: #d97706;
    --secondary-color: #fbbf24;
    --accent-color: #fcd34d;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    
    --bg-primary: #fffbeb;
    --bg-secondary: #fef3c7;
    --bg-tertiary: #fde68a;
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    
    --text-primary: #78350f;
    --text-secondary: #92400e;
    --text-muted: #a16207;
    --text-inverse: #ffffff;
    
    --border-color: #fde68a;
    --border-hover: #fcd34d;
    --shadow-sm: 0 1px 2px 0 rgb(245 158 11 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(245 158 11 / 0.1), 0 2px 4px -2px rgb(245 158 11 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(245 158 11 / 0.1), 0 4px 6px -4px rgb(245 158 11 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(245 158 11 / 0.1), 0 8px 10px -6px rgb(245 158 11 / 0.1);
    
    --gradient-primary: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    --gradient-secondary: linear-gradient(135deg, #fcd34d 0%, #fde68a 100%);
    --gradient-accent: linear-gradient(135deg, #10b981 0%, #ef4444 100%);
}

/* Cyan Theme */
[data-theme="cyan"] {
    --primary-color: #0891b2;
    --primary-hover: #0e7490;
    --secondary-color: #06b6d4;
    --accent-color: #22d3ee;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    
    --bg-primary: #ecfeff;
    --bg-secondary: #cffafe;
    --bg-tertiary: #a5f3fc;
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    
    --text-primary: #164e63;
    --text-secondary: #155e75;
    --text-muted: #0e7490;
    --text-inverse: #ffffff;
    
    --border-color: #67e8f9;
    --border-hover: #22d3ee;
    --shadow-sm: 0 1px 2px 0 rgb(8 145 178 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(8 145 178 / 0.1), 0 2px 4px -2px rgb(8 145 178 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(8 145 178 / 0.1), 0 4px 6px -4px rgb(8 145 178 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(8 145 178 / 0.1), 0 8px 10px -6px rgb(8 145 178 / 0.1);
    
    --gradient-primary: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%);
    --gradient-secondary: linear-gradient(135deg, #22d3ee 0%, #67e8f9 100%);
    --gradient-accent: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
}

/* Auto Theme (follows system preference) - Removed to prevent overriding explicit themes */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* App Container */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: var(--gradient-primary);
    color: var(--text-inverse);
    padding: 1rem 0;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.header-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.home-btn, .install-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--text-inverse);
    padding: 0.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.home-btn:hover, .install-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.app-title {
    font-size: 1.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.app-title i {
    font-size: 1.5rem;
}

.theme-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--text-inverse);
    padding: 0.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
}

.theme-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* Theme Dropdown */
.theme-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
    min-width: 200px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 0.5rem;
    backdrop-filter: blur(10px);
    /* Ensure dropdown has good contrast */
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.theme-btn:hover .theme-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.theme-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-primary);
    text-decoration: none;
}

.theme-option:hover {
    background: var(--bg-secondary);
}

.theme-option.active {
    background: var(--primary-color);
    color: var(--text-inverse);
}

.theme-color {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    border: 2px solid var(--border-color);
}

.theme-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    /* Ensure visibility with fallback */
    color: var(--text-primary, #1e293b);
    /* Force dark color for better visibility in dropdown */
    color: #1e293b;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem 0;
}

/* Section Styles */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-description {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* Tab Container */
.tab-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 1rem;
}

.tab-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.tab-btn.active {
    background: var(--gradient-primary);
    color: var(--text-inverse);
    border-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

/* Date Input Section */
.date-input-section {
    background: var(--bg-secondary);
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.date-input-container {
    max-width: 600px;
    margin: 0 auto;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.date-input,
.time-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.date-input:focus,
.time-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.calculate-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: var(--gradient-primary);
    color: var(--text-inverse);
    border: none;
    border-radius: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-md);
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.calculate-btn:active {
    transform: translateY(0);
}

/* Results Section */
.results-section {
    padding: 2rem 0;
}

.results-section.hidden {
    display: none;
}

/* View Toggle */
.view-toggle {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.view-toggle-btn {
    padding: 0.75rem 1.5rem;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.view-toggle-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.view-toggle-btn.active {
    background: var(--gradient-primary);
    color: var(--text-inverse);
    border-color: var(--primary-color);
}

/* Detailed Breakdown */
.detailed-breakdown {
    max-width: 800px;
    margin: 0 auto;
}

.detailed-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.detailed-card h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-size: 1.5rem;
}

.detailed-content {
    display: grid;
    gap: 1rem;
}

.detailed-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
}

.detailed-label {
    font-weight: 600;
    color: var(--text-primary);
}

.detailed-value {
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 1.1rem;
    text-align: right;
    max-width: 60%;
}

.target-date-display {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: var(--bg-card);
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
}

.target-date {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.direction-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* Time Grid - Bigger Cards */
.time-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.time-card {
    background: var(--bg-card);
    padding: 3rem 2rem;
    border-radius: 1rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
}

.time-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.time-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    line-height: 1.1;
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: break-word;
}

.time-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Responsive breakpoints for time grid */
@media (max-width: 768px) {
    .time-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .time-card {
        padding: 2rem 1.5rem;
        min-height: 140px;
    }
    
    .time-value {
        font-size: 1.8rem;
        overflow-wrap: break-word;
        word-break: break-word;
    }
}

@media (max-width: 480px) {
    .time-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .time-card {
        padding: 2.5rem 1.5rem;
        min-height: 120px;
    }
    
    .time-value {
        font-size: 1.6rem;
        overflow-wrap: break-word;
        word-break: break-word;
    }
}

/* On This Day Section */
.on-this-day-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.on-this-day-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.loading-spinner i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.events-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.event-item {
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.event-item:hover {
    /* Removed transform to prevent layout shifts */
    box-shadow: var(--shadow-sm);
}

.event-year {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.event-description {
    color: var(--text-primary);
    line-height: 1.5;
}

/* Mock Events Styling */
.mock-events {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mock-event {
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.mock-event .event-year {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    display: block;
}

.mock-event .event-description {
    color: var(--text-primary);
    line-height: 1.5;
    display: block;
}

/* Section Groups for Comprehensive On This Day */
.section-group {
    margin-bottom: 2rem;
}

.section-group .section-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

/* Event Type Styling */
.event-item.birthday-event {
    border-left-color: var(--success-color);
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.1) 0%, var(--bg-secondary) 100%);
}

.event-item.death-event {
    border-left-color: var(--error-color);
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.1) 0%, var(--bg-secondary) 100%);
}

.event-item.holiday-event {
    border-left-color: var(--warning-color);
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.1) 0%, var(--bg-secondary) 100%);
}

.event-item.entertainment-event {
    border-left-color: var(--secondary-color);
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.1) 0%, var(--bg-secondary) 100%);
}

.event-item.sports-event {
    border-left-color: var(--accent-color);
    background: linear-gradient(90deg, rgba(6, 182, 212, 0.1) 0%, var(--bg-secondary) 100%);
}

/* Section Spacing */
.section-spacer {
    margin: 1rem 0;
    border-top: 1px solid var(--border-color);
}

/* Iframe Fallback Styling */
.iframe-fallback {
    background: var(--bg-card);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.iframe-header {
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.iframe-header h3 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-size: 1.3rem;
}

.iframe-header p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.iframe-footer {
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.iframe-footer p {
    margin: 0;
    color: var(--text-muted);
}

.iframe-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

.iframe-footer a:hover {
    text-decoration: underline;
}

.on-this-day-error {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
    color: var(--error-color);
    font-size: 1.1rem;
}

.on-this-day-error i {
    font-size: 1.5rem;
}



/* Footer */
.footer {
    background: var(--bg-secondary);
    padding: 1.5rem 0 0.75rem;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.footer-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    text-align: center;
}

/* Social Links */
.social-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--bg-card);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    font-weight: 500;
    font-size: 0.8rem;
    min-height: 35px;
}

.social-link:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.social-link i {
    font-size: 1.1rem;
}

/* Donation Links */
.donation-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.donation-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem;
    color: var(--text-inverse);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.8rem;
    min-height: 35px;
}

.donation-link:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.donation-link.paypal {
    background: linear-gradient(135deg, #0070ba 0%, #1546a0 100%);
}

.donation-link.buymeacoffee {
    background: linear-gradient(135deg, #ffdd00 0%, #ff6b35 100%);
    color: #000;
}

.donation-link.kofi {
    background: linear-gradient(135deg, #ff5e5e 0%, #ff0000 100%);
}

.donation-link.patreon {
    background: linear-gradient(135deg, #f96854 0%, #e85d04 100%);
}

.donation-link i {
    font-size: 1.1rem;
}

/* Footer Bottom */
.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.footer-bottom i {
    color: var(--error-color);
}

.footer-bottom a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .header-content {
        padding: 0 0.75rem;
    }
    
    .app-title {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .time-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .time-card {
        padding: 2rem 1rem;
        min-height: 120px;
    }
    
    .time-value {
        font-size: 2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .social-links,
    .donation-links {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.4rem;
    }
    
    .social-link,
    .donation-link {
        font-size: 0.75rem;
        padding: 0.4rem;
        min-height: 30px;
    }
    
    .tab-container {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .tab-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 1rem 0;
    }
    
    .date-input-section {
        padding: 2rem 0;
    }
    
    .time-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .time-value {
        font-size: 1.75rem;
    }
    
    .time-label {
        font-size: 0.875rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .social-section,
    .donation-section {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .social-links,
    .donation-links {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.3rem;
        width: 100%;
    }
    
    .social-link,
    .donation-link {
        padding: 0.3rem;
        font-size: 0.7rem;
        min-height: 25px;
    }
    
    .social-link span,
    .donation-link span {
        display: none;
    }
    
    .view-toggle {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .view-toggle-btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .detailed-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .detailed-label {
        font-size: 0.875rem;
    }
    
    .detailed-value {
        font-size: 1rem;
        max-width: 100%;
        text-align: center;
    }
}

/* Animation Classes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

/* Focus Styles for Accessibility */
button:focus,
input:focus,
a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .theme-toggle,
    .calculate-btn {
        display: none !important;
    }
    
    .time-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
    }
}
