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

:root {
    --santa-red: #C41E3A;
    --santa-green: #165B33;
    --gold: #FFD700;
    --snow: #F8F9FA;
    --text-dark: #212529;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, var(--santa-red) 0%, #8B0000 100%);
    min-height: 100vh;
    color: var(--text-dark);
}

.header {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    padding: 1rem;
    text-align: center;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header h1 {
    font-size: 1.5rem;
    color: var(--santa-red);
    margin-bottom: 0.25rem;
}

.header p {
    color: var(--santa-green);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.donate-btn {
    display: inline-block;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: var(--text-dark);
    padding: 0.75rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(255, 165, 0, 0.4);
    transition: all 0.3s;
    border: 3px solid var(--gold);
}

.donate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 165, 0, 0.6);
    background: linear-gradient(135deg, #FFA500 0%, #FFD700 100%);
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 1rem;
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    background: white;
    border-radius: 16px;
    padding: 2rem 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.menu-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--santa-red);
    text-align: center;
    margin-bottom: 1.5rem;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.menu-btn {
    background: white;
    color: var(--text-dark);
    border: 3px solid var(--santa-red);
    padding: 1.5rem;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.2);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    min-height: 90px;
    justify-content: center;
}

.menu-btn:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(196, 30, 58, 0.3);
}

.menu-btn:hover {
    background: var(--snow);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(196, 30, 58, 0.3);
}

/* Content Sections */
.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

/* Back Button */
.back-btn {
    background: white;
    border: 2px solid var(--santa-red);
    color: var(--santa-red);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 1rem;
    font-size: 1rem;
    transition: all 0.2s;
}

.back-btn:hover {
    background: var(--santa-red);
    color: white;
}

.mobile-only {
    display: none;
}

.desktop-only {
    display: block;
}

/* Section Subtitle */
.section-subtitle {
    text-align: center;
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

/* Mobile Styles */
@media (max-width: 767px) {
    .mobile-menu {
        display: block;
    }
    
    .mobile-only {
        display: block;
    }
    
    .desktop-only {
        display: none !important;
    }
    
    /* Hide all sections by default on mobile */
    .content-section {
        display: none;
    }
    
    .content-section.active {
        display: block;
    }
    
    /* Hide menu when section is active */
    .mobile-menu.hidden {
        display: none;
    }
    
    /* Hide quick actions on mobile (replaced by menu) */
    .quick-actions {
        display: none;
    }
}

/* Desktop Styles */
@media (min-width: 768px) {
    .mobile-menu {
        display: none !important;
    }
    
    .content-section {
        display: block !important;
    }
    
    .mobile-only {
        display: none !important;
    }
    
    .quick-actions {
        display: grid !important;
    }
}

.search-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.search-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--santa-red);
    margin-bottom: 1rem;
    text-align: center;
}

.search-subtitle {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.search-box {
    position: relative;
    margin-bottom: 1rem;
}

.search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    font-size: 1.1rem;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: var(--santa-red);
    box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.1);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
}

.tab-buttons {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tab-btn {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid var(--santa-red);
    background: white;
    color: var(--santa-red);
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
}

.tab-btn.active {
    background: var(--santa-red);
    color: white;
}

.tab-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(196, 30, 58, 0.2);
}

.results-area {
    display: none;
    background: var(--snow);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1rem;
    max-height: 400px;
    overflow-y: auto;
}

.results-area.show {
    display: block;
    animation: slideDown 0.3s ease;
}

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

.result-item {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    border-left: 4px solid var(--santa-green);
    transition: transform 0.2s;
}

.result-item:hover {
    transform: translateX(4px);
}

.result-date {
    font-weight: bold;
    color: var(--santa-red);
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.result-street {
    color: var(--text-dark);
    font-size: 0.95rem;
    font-weight: 600;
}

.result-route {
    color: #666;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.result-time {
    color: var(--santa-green);
    font-size: 0.85rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.action-btn {
    background: white;
    border-radius: 12px;
    padding: 1.25rem 1rem;
    text-align: center;
    text-decoration: none;
    color: var(--text-dark);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.2s;
    border: none;
}

/* Outlined action buttons (Map, All Routes, About) */
.action-btn-outlined {
    border: 2px solid var(--text-dark);
}

.action-btn-outlined:hover {
    background: #d3d3d3;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

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

.action-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.action-text {
    font-weight: bold;
    font-size: 0.9rem;
}

.updates-section {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.section-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--santa-red);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.updates-container {
    max-height: 400px;
    overflow-y: auto;
}

.update-card {
    background: var(--snow);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: transform 0.2s;
}

.update-card:hover {
    transform: translateX(4px);
}

.update-card.no-hover:hover {
    transform: none;
}

.update-time {
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.update-text {
    color: var(--text-dark);
    line-height: 1.5;
}

.update-image {
    width: 100%;
    border-radius: 8px;
    margin-top: 0.5rem;
}

.fb-link {
    display: block;
    text-align: center;
    background: #1877f2;
    color: white;
    padding: 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 1rem;
    transition: all 0.2s;
}

.fb-link:hover {
    background: #145dbf;
}

.date-picker {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    margin-bottom: 0.5rem;
    background: white;
    color: var(--text-dark);
    text-align: center;
    position: relative;
}

.date-picker:focus {
    outline: none;
    border-color: var(--santa-red);
    box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.1);
}

/* Style the date picker placeholder/empty state on mobile */
.date-picker::-webkit-datetime-edit-text,
.date-picker::-webkit-datetime-edit-month-field,
.date-picker::-webkit-datetime-edit-day-field,
.date-picker::-webkit-datetime-edit-year-field {
    color: var(--text-dark);
}

.date-picker::-webkit-calendar-picker-indicator {
    cursor: pointer;
    font-size: 1.2rem;
}

/* When empty, show a better placeholder */
.date-picker:invalid {
    color: #999;
}

/* Helper text below date picker */
.date-helper {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    font-style: italic;
}

/* Hide helper when date is selected */
.date-picker:valid + .date-helper {
    display: none;
}

.disclaimer {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 0.75rem;
    margin-top: 1rem;
    border-radius: 8px;
    color: #856404;
    font-size: 0.85rem;
    line-height: 1.5;
}

.disclaimer strong {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.disclaimer-toggle {
    background: none;
    border: none;
    color: #856404;
    font-weight: bold;
    cursor: pointer;
    padding: 0.5rem 0;
    font-size: 0.85rem;
    text-decoration: underline;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.disclaimer-toggle:hover,
.disclaimer-toggle:active {
    color: #664d03;
}

.disclaimer-content {
    max-height: 3em;
    overflow: hidden;
    transition: max-height 0.3s ease;
    line-height: 1.5em;
}

.disclaimer-content.expanded {
    max-height: 1000px;
}

.disclaimer-arrow {
    transition: transform 0.3s ease;
    display: inline-block;
}

.disclaimer-arrow.rotated {
    transform: rotate(90deg);
}

.loading, .loading-updates {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.no-results {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--santa-red);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.snowflake {
    position: fixed;
    color: white;
    font-size: 1.5rem;
    opacity: 0.7;
    animation: fall linear infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes fall {
    to {
        transform: translateY(100vh);
    }
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    animation: fadeIn 0.3s;
}

.modal.show {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    animation: slideUp 0.3s;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 2px solid var(--snow);
    background: var(--santa-red);
    color: white;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.close-modal {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.close-modal:hover {
    background: rgba(255,255,255,0.2);
}

.modal-body {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

.route-group {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--snow);
}

.route-group:last-child {
    border-bottom: none;
}

.route-title {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--santa-red);
    margin-bottom: 0.25rem;
}

.route-subtitle {
    color: var(--santa-green);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.route-date {
    color: var(--santa-green);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.streets-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.street-tag {
    background: var(--snow);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-dark);
}

/* List view for All Routes modal */
.streets-list-view {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.street-list-item {
    padding: 0.75rem 1rem;
    background: white;
    border-bottom: 1px solid var(--snow);
    font-size: 0.95rem;
    color: var(--text-dark);
}

.street-list-item:first-child {
    border-radius: 8px 8px 0 0;
}

.street-list-item:last-child {
    border-bottom: none;
    border-radius: 0 0 8px 8px;
}

.street-list-item:only-child {
    border-radius: 8px;
}

.street-list-item:nth-child(even) {
    background: var(--snow);
}

/* Last Seen Section */
.last-seen-section {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    color: var(--text-dark);
}

.last-seen-section .section-title {
    color: var(--text-dark);
    font-size: 1.25rem;
}

.latest-sighting {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.sighting-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--snow);
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.sighting-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.sighting-details {
    flex: 1;
}

.sighting-street {
    font-weight: bold;
    color: var(--santa-red);
    font-size: 1.1rem;
}

.sighting-user-time {
    font-weight: bold;
    color: var(--text-dark);
    font-size: 1.1rem;
    margin-top: 0.25rem;
}

.sighting-reported {
    color: #999;
    font-size: 0.8rem;
    margin-top: 0.5rem;
    font-style: italic;
}

.sighting-time {
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.report-sighting-btn {
    width: 100%;
    background: var(--santa-red);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.report-sighting-btn:hover {
    background: #a01830;
    transform: translateY(-2px);
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: var(--santa-red);
    box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.1);
}

.street-suggestions {
    position: relative;
    max-height: 200px;
    overflow-y: auto;
    background: white;
    border: 2px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    display: none;
}

.street-suggestions.show {
    display: block;
}

.suggestion-item {
    padding: 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.suggestion-item:hover {
    background: var(--snow);
}

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

.time-options {
    display: flex;
    gap: 0.5rem;
}

.time-btn {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid var(--santa-red);
    background: white;
    color: var(--santa-red);
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.time-btn.active {
    background: var(--santa-red);
    color: white;
}

.time-btn:hover {
    transform: translateY(-2px);
}

.submit-btn {
    width: 100%;
    background: var(--santa-green);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.submit-btn:hover {
    background: #0f4523;
    transform: translateY(-2px);
}

.submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.form-message {
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: none;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    display: block;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
    display: block;
}

.footer {
    background: rgba(255,255,255,0.95);
    padding: 1.5rem;
    text-align: center;
    margin-top: 2rem;
}

.footer p {
    margin: 0.25rem 0;
    color: var(--text-dark);
}

.footer-link {
    color: var(--santa-red);
    text-decoration: none;
    font-weight: bold;
    transition: all 0.2s;
}

.footer-link:hover {
    color: var(--santa-green);
    text-decoration: underline;
}

@media (min-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }
    
    .search-card {
        padding: 2rem;
    }

    .container {
        padding: 2rem 1rem;
    }

    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
/* Cookie Banner Styles */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(33, 37, 41, 0.98);
    color: white;
    padding: 1.5rem;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
    z-index: 10000;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cookie-text {
    flex: 1;
}

.cookie-text strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.cookie-text p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #e0e0e0;
}

.cookie-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.cookie-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
}

.cookie-accept {
    background: var(--santa-green);
    color: white;
}

.cookie-accept:hover {
    background: #0f4523;
}

.cookie-decline {
    background: #666;
    color: white;
}

.cookie-decline:hover {
    background: #555;
}

.cookie-link {
    color: var(--gold);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
}

.cookie-link:hover {
    text-decoration: underline;
}

/* Desktop layout */
@media (min-width: 768px) {
    .cookie-content {
        flex-direction: row;
        align-items: center;
    }
    
    .cookie-buttons {
        flex-shrink: 0;
    }
}

/* Mobile adjustments */
@media (max-width: 767px) {
    .cookie-banner {
        padding: 1rem;
    }
    
    .cookie-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .cookie-btn {
        width: 100%;
    }
}