/* =====================================================
   SCOOTERCAM UNIFIED STYLESHEET
   Combined and cleaned up from multiple sources
   Enhanced for accessibility and readability
   ===================================================== */

/* =====================================================
   CUSTOM FONTS
   ===================================================== */

@font-face {
    font-family: 'Cherry Cream Soda';
    src: url('fonts/cherry-cream-soda.woff2') format('woff2'),
         url('fonts/cherry-cream-soda.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* =====================================================
   CSS CUSTOM PROPERTIES (Brand Colors)
   ===================================================== */

:root {
    /* Primary Brand Colors */
    --color-primary: #164866;
    --color-secondary: #38b6ff;
    --color-accent: #f3b02e;
    --color-alert: #df4a2a;
    
    /* Orange Brand Variants */
    --scootercam-orange: #df4a2a;
    --scootercam-orange-dark: #c13d1f;
    --scootercam-orange-light: #ff6347;
    
    /* Functional Colors */
    --color-text-primary: #333;
    --color-text-secondary: #666;
    --color-text-light: #888;
    --color-bg-main: #f5f5f5;
    --color-bg-card: #ffffff;
    --color-bg-alternate: #f8f9fa;
    --color-border: #dee2e6;
    
    /* Temperature Trend Colors */
    --color-temp-rising: #ff0000;
    --color-temp-falling: #00ffff;
    --color-temp-steady: #666;
    
    /* Typography */
    --font-display: 'Cherry Cream Soda', cursive;
    --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    --font-data: var(--font-body);
    
    /* Text Shadows */
    --text-shadow-dark: 0 1px 2px rgba(0, 0, 0, 0.8);
    --text-shadow-subtle: 0 1px 1px rgba(0, 0, 0, 0.5);
}

/* =====================================================
   BASE STYLES
   ===================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--color-text-primary);
    background: var(--color-bg-main);
}

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: normal;
}

.temp-display,
.condition-item .value,
.forecast-table td,
.temp-widget-main,
.temp-widget-change {
    font-family: var(--font-data);
    font-variant-numeric: tabular-nums;
}

.alert-content,
.forecast-text,
.forecast-period,
.forecast-card {
    font-family: var(--font-body);
    line-height: 1.7;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
}

/* =====================================================
   LINKS - Enhanced Contrast
   ===================================================== */

a {
    color: var(--scootercam-orange);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--scootercam-orange-dark);
}

a:focus {
    outline: 3px solid var(--scootercam-orange);
    outline-offset: 2px;
}

/* Content Links */
.forecast-text a,
.gallery-info a,
.guide-column a {
    color: var(--scootercam-orange);
    font-weight: 600;
}

.forecast-text a:hover,
.gallery-info a:hover,
.guide-column a:hover {
    color: var(--scootercam-orange-dark);
}

/* =====================================================
   HEADER
   ===================================================== */

.site-header {
    background: linear-gradient(
        to bottom, 
        var(--color-secondary) 0%, 
        var(--color-secondary) 35%, 
        var(--color-accent) 65%, 
        var(--color-accent) 100%
    );
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 1.5rem;
    align-items: center;
}

.header-logo a {
    display: block;
    line-height: 0;
}

.site-logo {
    width: 100px;
    height: 100px;
    display: block;
    transition: opacity 0.3s;
}

.site-logo:hover {
    opacity: 0.9;
}

.header-title {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.header-title .title-link {
    text-decoration: none;
    color: white;
    transition: opacity 0.3s;
}

.header-title .title-link:hover {
    opacity: 0.9;
}

.header-title .site-title {
    display: block;
    font-family: var(--font-display);
    font-size: 2.5rem;
    margin: 0;
    line-height: 1.2;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.5),
                 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.header-title .tagline {
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 400;
    opacity: 1;
    margin: 0.25rem 0 0 0;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5),
                 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.header-title .tagline-secondary {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-primary);
    margin: 0.25rem 0 0 0;
    opacity: 1;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
}

.header-toggle {
    display: none;
}

.menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: 2px solid var(--scootercam-orange);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    background: rgba(223, 74, 42, 0.1);
}

.menu-toggle:focus {
    outline: 3px solid var(--scootercam-orange);
    outline-offset: 2px;
}

.hamburger {
    display: block;
    width: 28px;
    height: 3px;
    background: var(--scootercam-orange);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.menu-toggle[aria-expanded="true"] .hamburger:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.menu-toggle[aria-expanded="true"] .hamburger:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] .hamburger:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.header-nav {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.main-nav {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
    list-style: none;
}

/* Navigation - Enhanced Contrast */
.main-nav a {
    color: #555;
    text-decoration: none;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.main-nav a:hover {
    color: var(--scootercam-orange);
    background: rgba(223, 74, 42, 0.05);
    border-bottom-color: var(--scootercam-orange);
}

.main-nav a.active {
    background: rgba(223, 74, 42, 0.08);
    color: var(--scootercam-orange);
    border-bottom: 3px solid var(--scootercam-orange);
    font-weight: 700;
}

.main-nav a::before {
    content: none;
}

/* =====================================================
   BUTTONS & INTERACTIVE ELEMENTS
   ===================================================== */

button:focus,
.toggle-btn:focus,
.mode-button:focus {
    outline: 3px solid var(--scootercam-orange);
    outline-offset: 2px;
}

/* Primary Buttons */
.btn-primary,
.toggle-btn.active,
.mode-button.active {
    background: #f8f8f8;
    color: var(--scootercam-orange);
    border: 2px solid var(--scootercam-orange);
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover,
.toggle-btn.active:hover,
.mode-button.active:hover {
    background: #fff;
    color: var(--scootercam-orange-dark);
    border-color: var(--scootercam-orange-dark);
    box-shadow: 0 2px 8px rgba(223, 74, 42, 0.15);
}

/* Secondary Buttons */
.btn-secondary,
.toggle-btn {
    background: white;
    color: #555;
    border: 2px solid #ddd;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover,
.toggle-btn:hover {
    background: #f8f8f8;
    color: #333;
    border-color: #999;
}

/* View Toggle Buttons */
.view-toggle .toggle-btn,
.camera-toggle .toggle-btn {
    background: white;
    color: #555;
    border: 2px solid #ccc;
    font-weight: 600;
}

.view-toggle .toggle-btn:hover,
.camera-toggle .toggle-btn:hover {
    background: #f8f8f8;
    color: var(--scootercam-orange);
    border-color: var(--scootercam-orange);
}

.view-toggle .toggle-btn.active,
.camera-toggle .toggle-btn.active {
    background: rgba(223, 74, 42, 0.08);
    color: var(--scootercam-orange);
    border: 2px solid var(--scootercam-orange);
    font-weight: 700;
}

/* Back/Navigation Buttons */
.btn-back {
    background: #f5f5f5;
    color: #333;
    border: 2px solid #ddd;
}

.btn-back:hover {
    background: #fff;
    color: var(--scootercam-orange);
    border-color: var(--scootercam-orange);
}

/* =====================================================
   PAGE HEADERS
   ===================================================== */

.page-header {
    background: linear-gradient(135deg, #f8f8f8 0%, #efefef 100%);
    color: #333;
    padding: 2rem;
    margin: 2rem 0;
    border-radius: 8px;
    border-left: 5px solid var(--scootercam-orange);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.page-header h1 {
    color: #333;
    margin: 0 0 0.5rem 0;
}

.page-header .subtitle {
    color: #666;
    font-size: 1.1rem;
}

/* =====================================================
   TEMPERATURE WIDGET
   ===================================================== */

.temp-widget {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.temp-widget-main {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 0;
    color: var(--color-primary);
    line-height: 1;
}

.temp-widget-trend {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.temp-widget-change {
    font-size: 1rem;
    color: var(--color-text-light);
    font-weight: normal;
}

.temp-widget-rising .temp-widget-trend {
    color: var(--color-temp-rising);
}

.temp-widget-falling .temp-widget-trend {
    color: var(--color-temp-falling);
}

.temp-widget-steady .temp-widget-trend {
    color: var(--color-temp-steady);
}

.temp-widget.unavailable {
    opacity: 0.6;
    font-style: italic;
}

/* =====================================================
   WEATHER ALERTS - Enhanced Contrast
   ===================================================== */

.alerts-section {
    margin: 2rem 0;
}

.alert {
    margin: 15px 0;
    border-left: 5px solid var(--color-accent);
    background: var(--color-bg-card);
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* Severity colors */
.alert-extreme { 
    border-left-color: #d32f2f; 
    background: #ffebee; 
}

.alert-severe { 
    border-left-color: #ff6f00; 
    background: #fff3e0; 
}

.alert-moderate { 
    border-left-color: #ffa000; 
    background: #fff8e1; 
}

.alert-minor { 
    border-left-color: #1976d2; 
    background: #e3f2fd; 
}

.alert-unknown { 
    border-left-color: #757575; 
    background: #f5f5f5; 
}

/* Legacy alert support */
.alert-high {
    border-left-color: var(--color-accent);
    background: #fff8f3;
}

.alert-header {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    gap: 12px;
    background: rgba(223, 74, 42, 0.1);
}

.alert-header.clickable {
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.alert-header.clickable:hover {
    background: rgba(0,0,0,0.03);
}

.alert-emoji {
    font-size: 1.5em;
    flex-shrink: 0;
    line-height: 1;
}

.alert-content {
    flex: 1;
    min-width: 0;
}

.alert-content strong {
    color: var(--color-alert);
}

.alert-type {
    display: block;
    color: var(--scootercam-orange-dark);
    font-size: 1.05em;
    margin-bottom: 5px;
    font-weight: 600;
}

.alert-headline-brief {
    display: block;
    margin: 5px 0;
    line-height: 1.4;
}

.alert-text {
    display: block;
    line-height: 1.5;
    color: #333;
}

.alert-expires {
    display: block;
    margin-top: 5px;
    font-size: 0.9em;
    color: #666;
    font-style: italic;
}

.alert-toggle {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #666;
    flex-shrink: 0;
    transition: transform 0.2s, color 0.2s;
    display: flex;
    align-items: center;
}

.alert-toggle:hover {
    color: #333;
}

.alert-toggle[aria-expanded="true"] .toggle-icon {
    transform: rotate(180deg);
}

.toggle-icon {
    transition: transform 0.2s;
}

.alert-details {
    padding: 0 15px 15px 15px;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.alert-details[hidden] {
    display: none;
}

.alert-section {
    margin: 15px 0;
}

.alert-section h4 {
    margin: 0 0 8px 0;
    font-size: 1rem;
    color: #333;
    font-weight: 600;
}

.alert-section .alert-text {
    font-size: 0.95em;
    line-height: 1.6;
}

.alert-instructions {
    background: rgba(255, 152, 0, 0.08);
    padding: 12px;
    border-radius: 4px;
    border-left: 3px solid #ff9800;
    margin: 12px 0;
}

.alert-instructions h4 {
    color: #e65100;
}

.alert-meta-footer {
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid rgba(0,0,0,0.08);
    font-size: 0.85em;
    color: #666;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.alert.alert-detailed.alert-severe .alert-header {
    background: var(--scootercam-orange);
    color: white;
}

.alert.alert-detailed.alert-severe .alert-type {
    color: white;
    text-shadow: var(--text-shadow-dark);
}

.alerts-footer {
    text-align: right;
    padding: 10px 5px;
    color: #666;
    font-size: 0.9em;
}

/* =====================================================
   HERO & CAMERA SECTIONS
   ===================================================== */

.hero-section {
    background: var(--color-bg-card);
    padding: 2rem;
    margin: 2rem 0;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.camera-section,
.cameras-section {
    background: var(--color-bg-card);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.camera-view {
    margin-bottom: 2rem;
}

.camera-view:last-child {
    margin-bottom: 0;
}

.hero-section h2,
.camera-section h2,
.cameras-section h2,
.camera-view h3 {
    margin-bottom: 1rem;
    color: var(--color-primary);
    font-size: 1.5rem;
}

.camera-label {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: normal;
    color: var(--color-primary);
    margin: 0 0 1rem 0;
}

.camera-header h2 {
    color: #333;
}

.camera-specs {
    background: #f8f8f8;
    border-left: 4px solid var(--scootercam-orange);
    padding: 1rem;
    border-radius: 4px;
}

.hero-link {
    display: block;
    text-decoration: none;
    transition: opacity 0.3s;
}

.hero-link:hover {
    opacity: 0.9;
}

.hero-container {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.hero-link:hover .hero-container {
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.hero-image,
.camera-image {
    width: 100%;
    height: auto;
    display: block;
}

/* =====================================================
   CURRENT CONDITIONS - Enhanced Contrast
   ===================================================== */

.current-section {
    background: var(--color-bg-card);
    margin: 0.125rem 0;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.current-section h2 {
    margin-bottom: 1.5rem;
    color: var(--color-primary);
}

.current-selection {
    background: #f8f8f8;
    color: #333;
    padding: 1.5rem;
    border-radius: 6px;
    border-left: 5px solid var(--scootercam-orange);
    margin-bottom: 1.5rem;
}

.current-selection strong {
    color: var(--scootercam-orange);
    font-weight: 700;
}

.conditions-card {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.conditions-main {
    text-align: center;
    padding: 1.5rem;
    background: var(--color-bg-card);
    color: var(--color-primary);
    border-radius: 6px;
    border-left: 3px solid var(--color-primary);
}

.temp-display {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0.25rem;
    color: var(--color-primary);
}

.temp-display .temp {
    font-size: 4rem;
    font-weight: bold;
    line-height: 1;
}

.temp-display .unit {
    font-size: 1.5rem;
    margin-top: 0.5rem;
}

.feels-like {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    margin-top: 0.5rem;
}

.temp-trend-display {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}

.temp-trend {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    color: var(--color-text-primary);
}

.temp-trend .trend-emoji {
    font-size: 1.5rem;
}

.temp-trend .trend-text {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.temp-trend .trend-change {
    font-weight: bold;
    font-size: 1.1rem;
}

.temp-trend .trend-timeframe {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-left: auto;
}

.temp-trend-rising .trend-change {
    color: var(--color-temp-rising);
}

.temp-trend-falling .trend-change {
    color: var(--color-temp-falling);
}

.temp-trend-steady .trend-text {
    color: var(--color-temp-steady);
}

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

.condition-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--color-bg-alternate);
    border-radius: 6px;
    border-left: 3px solid var(--color-primary);
}

.condition-item .icon {
    font-size: 2rem;
}

.condition-item .details {
    display: flex;
    flex-direction: column;
}

.condition-item .label {
    font-size: 0.85rem;
    color: #555;
    font-weight: 600;
}

.condition-item .value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #222;
}

.conditions-updated {
    text-align: center;
    color: var(--color-text-light);
    font-size: 0.9rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}

/* =====================================================
   FORECAST SECTIONS - Enhanced Contrast
   ===================================================== */

.forecast-section {
    background: var(--color-bg-card);
    padding: 2rem;
    margin: 2rem 0;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.forecast-section h2,
.forecast-section h3 {
    margin-bottom: 1rem;
    color: #333;
}

.forecast-text {
    line-height: 1.8;
}

.forecast-periods {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.forecast-period {
    padding: 1rem;
    background: var(--color-bg-alternate);
    border-left: 4px solid var(--color-primary);
    border-radius: 4px;
}

.forecast-period h3 {
    margin-bottom: 0.5rem;
    color: var(--color-text-primary);
}

.forecast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.forecast-card {
    padding: 1rem;
    background: var(--color-bg-alternate);
    border-radius: 6px;
    border-left: 4px solid var(--scootercam-orange);
}

.forecast-card h4 {
    margin-bottom: 0.5rem;
    color: var(--color-text-primary);
}

.forecast-card:hover {
    border-left-color: var(--scootercam-orange-dark);
}

.forecast-table-section {
    background: var(--color-bg-card);
    padding: 2rem;
    margin: 2rem 0;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.forecast-table h3 {
    margin-bottom: 1rem;
    color: var(--color-primary);
}

.forecast-table table {
    width: 100%;
    border-collapse: collapse;
}

.forecast-table th {
    background: var(--color-bg-alternate);
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--color-primary);
    color: var(--color-primary);
}

.forecast-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--color-border);
}

.forecast-table tbody tr:hover {
    background: var(--color-bg-alternate);
}

.forecast-table .icon {
    font-size: 1.5rem;
    margin-right: 0.5rem;
}

.forecast-table .text {
    font-size: 0.9rem;
}

/* =====================================================
   SUN & MOON ASTRONOMY
   ===================================================== */

.astronomy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.sun-moon-card,
.moon-calendar-container,
.sun-moon-arc-container,
.moon-details-container {
    background: var(--color-bg-card);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--color-primary);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.sun-moon-header,
.moon-calendar-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.sun-moon-header h3,
.moon-calendar-header h3 {
    font-family: var(--font-display);
    color: var(--color-primary);
    font-size: 1.5rem;
    margin: 0;
}

.sun-moon-emoji {
    font-size: 2rem;
    flex-shrink: 0;
}

.sun-moon-main {
    text-align: center;
    padding: 1.5rem 0;
}

.sun-moon-score {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
    font-family: var(--font-data);
    font-variant-numeric: tabular-nums;
}

.sun-moon-score .score-value {
    font-size: 3.5rem;
    font-weight: bold;
    line-height: 1;
}

.sun-moon-score .score-max {
    font-size: 1.5rem;
    color: var(--color-text-secondary);
}

.sun-moon-score .score-na {
    font-size: 3.5rem;
    color: var(--color-text-light);
}

.score-excellent .score-value { color: #22c55e; }
.score-great .score-value { color: var(--color-secondary); }
.score-good .score-value { color: var(--color-accent); }
.score-fair .score-value { color: var(--color-accent); }
.score-poor .score-value { color: var(--color-alert); }
.score-none .score-na { color: var(--color-text-light); }

.sun-moon-grade {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--color-text-primary);
    margin-bottom: 0.5rem;
}

.sun-moon-time {
    font-size: 1rem;
    color: var(--color-text-secondary);
}

.sun-moon-details {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
    color: var(--color-text-primary);
    line-height: 1.6;
}

.sun-moon-details p {
    margin: 0.5rem 0;
}

.moon-phase-info {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
}

/* Moon Calendar */
.moon-calendar {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    overflow: hidden;
}

.moon-cal-cell {
    padding: 1rem 0.5rem;
    text-align: center;
    border-right: 1px solid var(--color-border);
    background: var(--color-bg-alternate);
}

.moon-cal-cell:last-child {
    border-right: none;
}

.moon-cal-now {
    background: #e3f2fd;
    border-left: 3px solid var(--color-secondary);
    border-right: 3px solid var(--color-secondary);
}

.moon-cal-name {
    font-size: 0.95rem;
    font-weight: bold;
    color: var(--color-text-primary);
    margin-bottom: 0.25rem;
}

.moon-cal-now .moon-cal-name {
    color: var(--color-secondary);
    font-size: 1.05rem;
}

.moon-cal-date {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}

.moon-cal-now .moon-cal-date {
    color: var(--color-secondary);
    font-weight: bold;
}

.moon-calendar-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
    text-align: center;
    font-size: 0.95rem;
    color: var(--color-text-secondary);
}

.moon-calendar-footer strong {
    color: var(--color-text-primary);
}

.arc-svg-wrapper {
    margin-top: 1rem;
}

.arc-svg-wrapper svg {
    width: 100%;
    height: auto;
    display: block;
}

.moon-details-container .sun-moon-header {
    margin-bottom: 1.5rem;
}

.moon-details-container .conditions-grid {
    margin-top: 1rem;
}

/* =====================================================
   VIDEO PLAYERS - Unified styling
   ===================================================== */

.video-player-container,
.timelapse-container {
    position: relative;
    width: 100%;
    max-width: 1440px;
    margin: 2rem auto;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Segmented Control for Live/Timelapse Toggle */
.video-mode-control {
    display: flex;
    background: #f0f0f0;
    border-radius: 8px;
    padding: 4px;
    margin: 0 auto 1rem;
    max-width: 400px;
}

.mode-button {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-body);
}

.mode-button:hover {
    background: rgba(0, 0, 0, 0.05);
}

.mode-button.active {
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mode-label {
    font-weight: 600;
    font-size: 1rem;
    color: var(--color-text-primary);
}

.mode-button.active .mode-label {
    color: var(--color-secondary);
}

.mode-duration {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    margin-top: 0.25rem;
}

.mode-button.active .mode-duration {
    color: var(--color-secondary);
}

/* Video Wrapper */
.video-wrapper {
    width: 100%;
    position: relative;
    background: #000;
}

.video-player,
.timelapse-video {
    width: 100%;
    height: auto;
    display: block;
    background: #000;
}

/* Video Poster Overlay */
.video-poster-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    transition: opacity 0.3s ease-out;
    z-index: 2;
}

.video-poster-overlay picture,
.video-poster-overlay img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-player-container.playing .video-poster-overlay,
.timelapse-container.playing .video-poster-overlay {
    opacity: 0;
}

/* Simple Video Player */
.video-player-container.simple .video-label {
    text-align: center;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.5rem;
}

/* Video Metadata Overlays */
.timelapse-meta {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    z-index: 3;
}

.sunset-date {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 500;
    z-index: 3;
    margin: 0;
}

/* Video Placeholder */
.timelapse-placeholder {
    width: 100%;
    max-width: 1440px;
    margin: 2rem auto;
    padding: 3rem 2rem;
    background: var(--color-bg-alternate);
    border: 2px dashed var(--color-border);
    border-radius: 8px;
    text-align: center;
}

.timelapse-placeholder p {
    color: var(--color-text-secondary);
    font-size: 1.1rem;
    margin: 0;
}

/* =====================================================
   SUNSET ARCHIVE SECTION
   ===================================================== */

.sunset-archive {
    width: 100%;
    max-width: 1440px;
    margin: 3rem auto;
    padding: 2rem 1rem;
}

.sunset-archive h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--color-primary);
}

.sunset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.sunset-archive-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background: #000;
}

.sunset-archive-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(223, 74, 42, 0.3);
}

.sunset-link {
    display: block;
    position: relative;
    text-decoration: none;
    color: inherit;
}

.sunset-link:focus {
    outline: 3px solid var(--color-secondary);
    outline-offset: 3px;
}

.sunset-thumb {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.sunset-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    padding: 1rem;
    color: #fff;
}

.sunset-day {
    display: block;
    font-size: 0.9rem;
    font-weight: 400;
    opacity: 0.9;
    margin-bottom: 4px;
}

.sunset-info .sunset-date {
    position: static;
    background: none;
    padding: 0;
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
}

.sunset-archive-link {
    text-align: center;
    padding: 1rem 0;
}

.archive-button {
    display: inline-block;
    padding: 12px 24px;
    background: var(--color-secondary);
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background 0.2s ease;
}

.archive-button:hover {
    background: var(--color-primary);
    text-decoration: none;
}

.archive-button:focus {
    outline: 3px solid var(--color-secondary);
    outline-offset: 3px;
}

/* =====================================================
   GALLERY COMPONENTS
   ===================================================== */

.gallery-item:hover {
    box-shadow: 0 8px 20px rgba(223, 74, 42, 0.3);
}

.gallery-month h2 {
    color: #333;
    border-bottom-color: var(--scootercam-orange);
}

.month-nav a {
    background: white;
    color: #555;
    border: 2px solid #ddd;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.month-nav a:hover {
    background: #f8f8f8;
    color: var(--scootercam-orange);
    border-color: var(--scootercam-orange);
}

.download-link {
    background: #f5f5f5;
    color: var(--scootercam-orange);
    border: 2px solid var(--scootercam-orange);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.download-link:hover {
    background: rgba(223, 74, 42, 0.08);
    color: var(--scootercam-orange-dark);
    border-color: var(--scootercam-orange-dark);
}

/* =====================================================
   INFO CARDS & GUIDES
   ===================================================== */

.info-card h3 {
    color: var(--scootercam-orange);
    border-bottom: 2px solid var(--scootercam-orange);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.guide-column h3 {
    color: var(--scootercam-orange);
    margin-bottom: 1rem;
}

/* =====================================================
   FOOTER
   ===================================================== */

.site-footer {
    background: #2c2c2c;
    color: #ddd;
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
}

.site-footer a {
    color: var(--scootercam-orange-light);
    text-decoration: none;
}

.site-footer a:hover {
    color: white;
    text-decoration: underline;
}

/* Patreon Support */
.patreon-support {
    text-align: center;
    padding: 20px 0;
    margin-bottom: 20px;
    border-top: 2px solid rgba(223, 74, 42, 0.2);
    border-bottom: 2px solid rgba(223, 74, 42, 0.2);
}

.patreon-link {
    display: inline-block;
    padding: 12px 30px;
    background: var(--scootercam-orange);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 2px solid var(--scootercam-orange-dark);
}

.patreon-link:hover {
    background: var(--scootercam-orange-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(223, 74, 42, 0.25);
    color: white;
    border-color: var(--scootercam-orange-dark);
}

.patreon-icon {
    font-size: 1.2em;
    margin-right: 8px;
}

.patreon-text {
    font-style: italic;
}

/* =====================================================
   UTILITY CLASSES
   ===================================================== */

.error-message {
    padding: 1rem;
    background: #fff3cd;
    border: 1px solid var(--color-accent);
    border-radius: 4px;
    color: #856404;
}

.coming-soon {
    text-align: center;
    padding: 2rem;
    color: var(--color-text-light);
    font-style: italic;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* =====================================================
   PRINT STYLES
   ===================================================== */

@media print {
    .page-header {
        background: white;
        color: black;
        border: 2px solid black;
    }
    
    .page-header h1,
    .page-header .subtitle {
        color: black;
        text-shadow: none;
    }
    
    .menu-toggle,
    .header-nav,
    .video-mode-control,
    .patreon-support {
        display: none;
    }
}

/* =====================================================
   RESPONSIVE - TABLET (< 768px)
   ===================================================== */

@media (max-width: 768px) {
    /* Header */
    .header-title .site-title {
        font-size: 2rem;
    }
    
    .site-logo {
        width: 80px;
        height: 80px;
    }
    
    .header-title .tagline {
        font-size: 1rem;
    }
    
    .header-title .tagline-secondary {
        font-size: 0.85rem;
    }
    
    /* Mobile Menu */
    .header-toggle {
        display: block;
    }
    
    .header-nav {
        margin-top: 0;
        padding-top: 0;
        border-top: none;
        display: none;
        overflow: hidden;
    }
    
    .header-nav.active {
        display: block;
        margin-top: 1rem;
        background: white;
        border: 2px solid rgba(223, 74, 42, 0.2);
        border-radius: 8px;
    }
    
    .main-nav {
        flex-direction: column;
        gap: 0;
        background: transparent;
        padding: 0.5rem 0;
    }
    
    .main-nav a {
        padding: 1rem 1.5rem;
        text-align: center;
        border-radius: 0;
        border-bottom: none;
        width: 100%;
        display: block;
        color: #333;
    }
    
    .main-nav a:hover,
    .main-nav a.active {
        background: var(--scootercam-orange);
        color: white;
        text-shadow: var(--text-shadow-dark);
    }
    
    /* Temperature Widget */
    .temp-widget {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .temp-widget-main {
        font-size: 2rem;
    }
    
    .temp-widget-trend {
        font-size: 1.1rem;
    }
    
    .temp-widget-change {
        font-size: 0.95rem;
    }
    
    /* Sections */
    .camera-section,
    .cameras-section {
        padding: 1rem;
    }
    
    /* Alerts */
    .alert-header {
        padding: 12px;
    }
    
    .alert-details {
        padding: 0 12px 12px 12px;
    }
    
    .alert-emoji {
        font-size: 1.3em;
    }
    
    .alert-type {
        font-size: 1em;
    }
    
    /* Conditions */
    .temp-display .temp {
        font-size: 3rem;
    }
    
    .conditions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Forecast Table */
    .forecast-table {
        overflow-x: auto;
    }
    
    .forecast-table table {
        font-size: 0.85rem;
    }
    
    .forecast-table th,
    .forecast-table td {
        padding: 0.5rem;
    }
    
    /* Moon Calendar */
    .moon-calendar {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .moon-cal-cell {
        border-bottom: 1px solid var(--color-border);
        border-right: 1px solid var(--color-border);
    }
    
    .moon-cal-cell:nth-child(3n) {
        border-right: none;
    }
    
    .moon-cal-cell:nth-last-child(-n+3) {
        border-bottom: none;
    }
    
    .moon-cal-now {
        border: 3px solid var(--color-secondary);
    }
    
    .sun-moon-score .score-value {
        font-size: 2.5rem;
    }
    
    .sun-moon-score .score-max {
        font-size: 1.25rem;
    }
    
    /* Video Players */
    .video-player-container,
    .timelapse-container {
        margin: 1.5rem auto;
        border-radius: 6px;
    }
    
    .video-mode-control {
        max-width: 100%;
    }
    
    .mode-button {
        padding: 0.5rem 0.75rem;
    }
    
    .mode-label {
        font-size: 0.875rem;
    }
    
    .mode-duration {
        font-size: 0.675rem;
    }
    
    .sunset-date {
        top: 10px;
        left: 10px;
        padding: 6px 12px;
        font-size: 1rem;
    }
    
    .timelapse-meta {
        bottom: 8px;
        right: 8px;
        font-size: 0.75rem;
        padding: 3px 6px;
    }
    
    /* Sunset Archive */
    .sunset-archive {
        padding: 1.5rem 0.5rem;
    }
    
    .sunset-archive h2 {
        font-size: 1.75rem;
    }
    
    .sunset-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1rem;
    }
    
    /* Buttons - Larger touch targets */
    .toggle-btn,
    .mode-button,
    .btn {
        min-height: 44px;
        padding: 12px 20px;
        font-size: 1rem;
    }
    
    /* Patreon */
    .patreon-support {
        padding: 15px 10px;
    }
    
    .patreon-link {
        padding: 12px 20px;
        font-size: 0.95rem;
        display: block;
        width: 100%;
        box-sizing: border-box;
    }
}

/* =====================================================
   RESPONSIVE - SMALL MOBILE (< 480px)
   ===================================================== */

@media (max-width: 480px) {
    .header-title .site-title {
        font-size: 1.5rem;
    }
    
    .site-logo {
        width: 60px;
        height: 60px;
    }
    
    .header-title .tagline {
        font-size: 0.9rem;
    }
    
    .header-title .tagline-secondary {
        font-size: 0.8rem;
    }
    
    .camera-section,
    .cameras-section {
        padding: 0.75rem;
    }
    
    /* Moon Calendar - 2 columns on very small screens */
    .moon-calendar {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .moon-cal-cell:nth-child(3n) {
        border-right: 1px solid var(--color-border);
    }
    
    .moon-cal-cell:nth-child(2n) {
        border-right: none;
    }
    
    .sun-moon-score .score-value {
        font-size: 2rem;
    }
    
    .sun-moon-emoji {
        font-size: 1.5rem;
    }
    
    .sun-moon-header h3 {
        font-size: 1.25rem;
    }
    
    .video-player-container,
    .timelapse-container {
        margin: 1rem auto;
    }
    
    .sunset-grid {
        grid-template-columns: 1fr;
    }
}