:root {
    /* Theme colors with improved contrast */
    --brand-primary: #0074e0; /* Darker blue for better contrast */
    --brand-secondary: #e5e5e5;
    --brand-accent: #1976d2; /* Darker accent for better contrast */
    --primary-color: #0074e0;
    --secondary-color: #e5e5e5;
    --bg-color: #e5e5e5;
    --container-bg: #fff;
    --text-color: #222; /* Darker text for better contrast */
    --link-color: #0056b3; /* Darker link color for better contrast */
    --heading-color: #0d47a1; /* Darker heading color */
    --border-color: #ddd;
    --input-border: #bbb; /* Darker border for better visibility */
    --button-bg: #0074e0;
    --button-text: #fff;
    --chat-bot-bg: #fff;
    --chat-user-bg: #0074e0;
    --chat-user-text: #fff;
    --section-bg: #f5f5f5;

    /* Alert colors with improved contrast */
    --alert-extreme: #d50000; /* Darker red */
    --alert-severe: #d03b00; /* Darker orange-red */
    --alert-moderate: #e65100; /* Darker orange */
    --alert-minor: #b38600; /* Darker yellow */
    --alert-text: #ffffff;

    /* Focus outline */
    --focus-outline: #0074e0;
    --focus-ring: 0 0 0 3px rgba(0, 116, 224, 0.4);

    /* Loading indicators */
    --spinner-size: 40px;
    --spinner-border: 4px;
}

[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --container-bg: rgba(45, 45, 45, 0.95);
    --text-color: #e0e0e0;
    --link-color: #64b5f6;
    --heading-color: #90caf9;
    --border-color: #404040;
    --input-border: #404040;
    --button-bg: #1976d2;
    --button-text: #fff;
    --chat-bot-bg: rgba(56, 56, 56, 0.8);
    --chat-user-bg: #1976d2;
    --chat-user-text: #fff;
    --section-bg: rgba(30, 30, 30, 0.8);
    --weather-section-bg: #2d2d2d;

    /* Alert colors remain the same for visibility */
}

/* Pull to refresh and loading indicators */
.pull-to-refresh {
    height: 0;
    overflow: hidden;
    transition: height 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--section-bg);
    width: 100%;
}

.pull-to-refresh.active {
    height: 50px;
}

.loading-indicator {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .loading-indicator {
    background: rgba(30, 30, 30, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.loading-indicator.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.spinner {
    width: var(--spinner-size);
    height: var(--spinner-size);
    border: var(--spinner-border) solid var(--button-bg);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-indicator .text {
    color: var(--text-color);
    font-size: 14px;
    font-weight: 500;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, var(--bg-color), var(--brand-primary));
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--text-color);
    transition: all 0.3s ease;
    overscroll-behavior-y: none;
    position: relative;
}

#chat-box {
    position: relative;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
}

/* Traffic Camera Styles */
.traffic-camera-container {
    background: var(--section-bg);
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
    width: 100%;
    transition: background-color 0.3s ease;
}

.traffic-camera-container h3 {
    color: var(--heading-color);
    margin: 0 0 12px 0;
    font-size: 1.2em;
}

.traffic-camera-container iframe {
    border-radius: 4px;
    background: var(--container-bg);
    margin-bottom: 8px;
    transition: background-color 0.3s ease;
}

.traffic-camera-container p {
    margin: 8px 0 0;
    color: var(--text-color);
    font-size: 0.9em;
    text-align: center;
    opacity: 0.8;
}

@media (max-width: 660px) {
    .traffic-camera-container iframe {
        height: 300px;
    }
}

.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

#dark-mode-toggle {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-color);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] #dark-mode-toggle {
    background: rgba(30, 30, 30, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

#dark-mode-toggle:hover {
    background: var(--button-bg);
    color: var(--button-text);
    transform: scale(1.1);
}

/* Enhanced focus styles for better accessibility */
#dark-mode-toggle:focus,
button:focus,
input:focus,
a:focus {
    outline: none;
    box-shadow: var(--focus-ring);
    border-color: var(--focus-outline);
}

/* Keyboard focus indicator */
button:focus-visible,
input:focus-visible,
a:focus-visible,
[role="button"]:focus-visible {
    outline: 2px solid var(--focus-outline);
    outline-offset: 2px;
    box-shadow: var(--focus-ring);
}

.branding {
    width: 100%;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
    padding: 32px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.branding::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        circle at top right,
        rgba(255, 255, 255, 0.2),
        transparent 70%
    );
}

.branding h1 {
    font-size: 2.5em;
    font-weight: 800;
    margin: 0;
    position: relative;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.branding p {
    font-size: 1.2em;
    opacity: 0.9;
    margin: 8px 0 0;
    font-weight: 500;
}

.chat-container {
    width: 100%;
    min-height: 100vh;
    background: transparent;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
    transition: all 0.3s ease;
}

[data-theme="dark"] .chat-container {
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* Emergency Alert Styles */
.alerts-container {
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
}

.alerts-container.active {
    max-height: 300px;
    overflow-y: auto;
}

.alert-message {
    padding: 12px 16px;
    margin-bottom: 1px;
    color: var(--alert-text);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: alertSlideIn 0.3s ease-in-out;
}

.alert-message {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.alert-message.extreme { 
    background: rgba(213, 0, 0, 0.9);
}

.alert-message.severe { 
    background: rgba(208, 59, 0, 0.9);
}

.alert-message.moderate { 
    background: rgba(230, 81, 0, 0.9);
}

.alert-message.minor { 
    background: rgba(179, 134, 0, 0.9);
}

[data-theme="dark"] .alert-message {
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.alert-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.alert-description {
    font-size: 0.9em;
    margin-bottom: 4px;
}

.alert-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.alert-link {
    color: var(--alert-text);
    text-decoration: underline;
    font-size: 0.9em;
}

.alert-dismiss {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--alert-text);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
    margin-left: auto;
    transition: all 0.3s ease;
}

.alert-dismiss:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.alert-dismiss:active {
    transform: translateY(0);
    box-shadow: none;
}

@keyframes alertSlideIn {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Pulsing animation for extreme alerts */
.alert-message.extreme {
    animation: alertPulse 2s infinite;
}

@keyframes alertPulse {
    0% { opacity: 1; }
    50% { opacity: 0.8; }
    100% { opacity: 1; }
}

#chat-box {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] #chat-box {
    background: rgba(30, 30, 30, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.message {
    margin-bottom: 20px;
    max-width: 80%;
    animation: fadeIn 0.3s ease-in;
}

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

.user {
    margin-left: auto;
    background: rgba(0, 116, 224, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--chat-user-text);
    border-radius: 18px 18px 4px 18px;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.bot {
    margin-right: auto;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--text-color);
    border-radius: 18px 18px 18px 4px;
    padding: 16px 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

[data-theme="dark"] .bot {
    background: rgba(40, 40, 40, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.bot h3 {
    margin-top: 0;
    color: var(--heading-color);
    font-size: 1.2em;
    margin-bottom: 12px;
}

.bot h4 {
    color: var(--link-color);
    margin: 16px 0 8px 0;
    font-size: 1.1em;
}

.weather-alerts-summary {
    margin: 12px 0;
    padding: 12px;
    border-radius: 8px;
    background: rgba(255, 0, 0, 0.05);
    border: 1px solid rgba(255, 0, 0, 0.2);
}

[data-theme="dark"] .weather-alerts-summary {
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.3);
}

.weather-alerts-summary h4 {
    color: var(--alert-extreme);
    margin: 0 0 8px 0;
}

.weather-links {
    background: var(--section-bg);
    padding: 16px;
    border-radius: 8px;
    margin: 16px 0;
    transition: background-color 0.3s ease;
}

[data-theme="dark"] .weather-links {
    background: rgba(25, 25, 25, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.weather-section {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 24px;
    border-radius: 16px;
    margin-bottom: 20px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .weather-section {
    background: rgba(45, 45, 45, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.weather-section:last-child {
    margin-bottom: 0;
}

.weather-section strong {
    color: var(--heading-color);
    display: block;
    margin-bottom: 12px;
    font-size: 1.1em;
    transition: color 0.3s ease;
}

.weather-links a {
    display: inline-block;
    padding: 6px 12px;
    color: var(--link-color);
    text-decoration: none;
    border-radius: 4px;
    margin: 4px;
    transition: all 0.3s ease;
}

[data-theme="dark"] .weather-links a {
    color: #64b5f6;
}

.weather-links a:hover {
    background: var(--link-color);
    color: var(--button-text);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

[data-theme="dark"] .weather-links a:hover {
    background: #1976d2;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.weather-links a:active {
    transform: translateY(0);
    box-shadow: none;
}

/* Traffic Cameras Section Specific Styles */
.weather-section:last-child a {
    display: inline-block;
    padding: 8px 16px;
    background-color: var(--section-bg);
    color: var(--heading-color);
    border: 1px solid var(--link-color);
    border-radius: 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.weather-section:last-child a:hover {
    background-color: var(--link-color);
    color: var(--button-text);
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

/* Ensure footer install button is visible by default */
#install-button {
    display: inline-block; /* Make visible initially */
}

.weather-section:last-child a:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.forecast-container {
    display: flex;
    gap: 20px;
    margin: 16px 0;
    flex-wrap: wrap;
}

.forecast-column {
    flex: 1;
    min-width: 280px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 24px;
    border-radius: 16px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .forecast-column {
    background: rgba(25, 25, 25, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.forecast-column h4 {
    margin-top: 0 !important;
    color: var(--heading-color) !important;
    transition: color 0.3s ease;
}

@media (max-width: 660px) {
    .forecast-container {
        flex-direction: column;
    }

    .forecast-column {
        width: 100%;
    }
}

.alert-summary {
    margin: 4px 0;
    padding: 8px;
    border-radius: 4px;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.alert-summary.extreme {
    background-color: rgba(255, 0, 0, 0.1);
    border-left: 4px solid #ff0000;
}

.alert-summary.severe {
    background-color: rgba(255, 69, 0, 0.1);
    border-left: 4px solid #ff4500;
}

.alert-summary.moderate {
    background-color: rgba(255, 165, 0, 0.1);
    border-left: 4px solid #ffa500;
}

.alert-summary.minor {
    background-color: rgba(255, 204, 0, 0.1);
    border-left: 4px solid #ffcc00;
}

.bot p {
    margin: 8px 0;
    line-height: 1.4;
}

.bot a {
    color: var(--link-color);
    text-decoration: none;
    display: inline-block;
    margin: 8px 16px 8px 0;
    font-weight: 500;
    transition: color 0.3s ease;
}

.bot a:hover {
    text-decoration: underline;
    opacity: 0.9;
}

#chat-form {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.1);
    padding: 24px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

[data-theme="dark"] #chat-form {
    background: rgba(30, 30, 30, 0.7);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.2);
}

.input-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.input-group input {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 16px 20px;
    font-size: 16px;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 120px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .input-group input {
    background: rgba(40, 40, 40, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

.input-group input:focus {
    background: white;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 4px rgba(0, 116, 224, 0.1);
    transform: translateY(-1px);
}

#submit-button {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    color: white;
    font-weight: 600;
    transform: translateY(0);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 4px 12px rgba(0, 116, 224, 0.2),
        0 1px 2px rgba(0, 116, 224, 0.1);
    align-self: flex-end; /* Position at the end of the flex container */
    margin-top: 10px;
}

#submit-button:hover {
    transform: translateY(-2px);
    box-shadow:
        0 6px 16px rgba(0, 116, 224, 0.3),
        0 2px 4px rgba(0, 116, 224, 0.1);
}

#submit-button:active {
    transform: translateY(0);
    box-shadow:
        0 2px 8px rgba(0, 116, 224, 0.2),
        0 1px 2px rgba(0, 116, 224, 0.1);
}

#submit-button:disabled {
    background: var(--border-color);
    cursor: not-allowed;
    opacity: 0.7;
}

[data-theme="dark"] input::placeholder {
    color: rgba(255,255,255,0.5);
}

[data-theme="dark"] #submit-button {
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Custom scrollbar */
#chat-box::-webkit-scrollbar {
    width: 8px;
}

#chat-box::-webkit-scrollbar-track {
    background: var(--section-bg);
    transition: background-color 0.3s ease;
}

#chat-box::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

#chat-box::-webkit-scrollbar-thumb:hover {
    background: var(--text-color);
    opacity: 0.7;
}

[data-theme="dark"] #chat-box::-webkit-scrollbar-thumb {
    opacity: 0.5;
}

/* Screen reader only elements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Mobile responsiveness */
@media (max-width: 860px) {
    body {
        height: 100vh;
        padding: 0;
        padding-bottom: 80px; /* Add padding for footer */
        overscroll-behavior-y: contain; /* Prevent body pull-to-refresh */
    }

    .chat-container {
        margin: 0;
        height: calc(100vh - 80px); /* Adjust for footer */
        border-radius: 0;
        max-height: -webkit-fill-available;
    }

    #chat-form {
        padding: 12px;
        gap: 8px;
        padding-bottom: 20px; /* Add extra padding at the bottom */
    }

    .input-group {
        margin-bottom: 60px; /* Increased space for submit button */
    }

    #submit-button {
        position: fixed;
        right: 16px;
        bottom: 100px; /* Moved up to avoid footer overlap */
        min-width: 120px;
        height: 44px; /* Increased touch target */
        font-size: 16px;
        padding: 0 24px;
        touch-action: manipulation;
        z-index: 100; /* Ensure button is above other content */
    }

    /* Improve touch targets */
    .alert-link,
    .alert-dismiss,
    .weather-links a,
    .close-modal,
    #dark-mode-toggle {
        min-height: 44px;
        min-width: 44px;
        padding: 12px 16px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        touch-action: manipulation;
    }

    /* Improved scrolling */
    #chat-box {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        overscroll-behavior-y: contain;
        padding-bottom: 20px;
    }

    /* Better touch feedback */
    .weather-links a:active,
    .alert-link:active,
    .alert-dismiss:active,
    #submit-button:active {
        background-color: var(--section-bg);
        transform: scale(0.98);
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .branding h1 {
        font-size: 2em;
    }

    .branding p {
        font-size: 1em;
    }

    #chat-form {
        padding: 8px;
        padding-bottom: 30px; /* Extra padding at bottom */
    }

    .input-group {
        gap: 8px;
        display: flex;
        flex-direction: column;
        margin-bottom: 70px; /* More space for the submit button */
    }

    #chat-input,
    #state-input,
    #zip-input {
        font-size: 16px; /* Prevent auto-zoom on iOS */
        height: 44px; /* Increased touch target */
        padding: 0 16px;
        width: 100%; /* Full width inputs */
        margin-bottom: 8px; /* Space between inputs */
    }

    /* Stack weather links on small screens */
    .weather-links a {
        display: block;
        width: 100%;
        margin: 4px 0;
        text-align: center;
    }

    .weather-section {
        padding: 16px;
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.weather-icon {
    animation: float 3s ease-in-out infinite;
}

.temperature {
    font-size: 3em;
    font-weight: 700;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: pulse 2s ease-in-out infinite;
}

.alert-message {
    border-left: 4px solid;
    animation: slideIn 0.3s ease-out;
}

.alert-message.extreme {
    background: linear-gradient(135deg, var(--alert-extreme), rgba(213, 0, 0, 0.8));
    animation: alertPulse 2s infinite;
}

@keyframes alertPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.95; transform: scale(1.002); }
}

.weather-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    padding: 20px;
    margin: 16px 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.weather-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.forecast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.forecast-item {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(4px);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    transition: all 0.3s ease;
}

.forecast-item:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
}

/* Copyright Footer Styles */
.copyright-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    padding: 10px 0;
    margin-top: 0;
    text-align: center;
    background: rgba(33, 150, 243, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

[data-theme="dark"] .copyright-footer {
    background: rgba(21, 101, 192, 0.9);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.2);
}



.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-logo {
    font-size: 1.5rem;
    margin-right: 5px;
}

.footer-text {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    color: white;
    font-weight: 500;
}

.copyright-text {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.trademark, .copyright-symbol {
    font-size: 0.9rem;
    vertical-align: super;
    opacity: 0.9;
}

.creator-text {
    margin-left: 10px;
    font-weight: 400;
}

.footer-email {
    color: white;
}

.footer-email a {
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.footer-email a:hover {
    opacity: 1;
    text-decoration: underline;
}



/* Dark mode adjustments for footer */
[data-theme="dark"] .copyright-footer {
    background: #1565C0; /* Darker blue for dark mode */
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Install App Button Styling */
.install-app-button {
    display: flex;
    align-items: center;
    background-color: transparent;
    border: none;
    color: #333;
    font-size: 0.9rem;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.install-app-button:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.install-checkbox {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 1px solid #999;
    border-radius: 2px;
    margin-right: 5px;
    position: relative;
    background-color: white;
}

[data-theme="dark"] .install-app-button {
    color: #e0e0e0;
}

[data-theme="dark"] .install-checkbox {
    border-color: #777;
    background-color: #444;
}

[data-theme="dark"] .install-app-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .copyright-footer {
        padding: 5px 0;
        height: 70px; /* Slightly taller on small screens */
    }

    .footer-content {
        flex-direction: column;
        gap: 3px;
    }

    .footer-text {
        font-size: 0.85rem;
    }

    .copyright-text {
        font-size: 0.95rem;
    }

    .footer-email {
        margin-top: 2px;
        font-size: 0.85rem;
    }

    .footer-actions {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
    }

    /* Adjust submit button position for smaller screens */
    #submit-button {
        bottom: 90px; /* Move up more on smaller screens */
    }

    /* Ensure the chat container has enough bottom padding */
    .chat-container {
        padding-bottom: 100px;
    }
}

/* Update Notification Styles */
.update-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    animation: slideIn 0.3s ease-out;
}

.update-content {
    background: rgba(25, 118, 210, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .update-content {
    background: rgba(13, 71, 161, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.update-content span {
    font-weight: 500;
}

.update-content button {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.update-content button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.update-content button:active {
    transform: translateY(0);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@media (max-width: 480px) {
    .update-notification {
        top: auto;
        bottom: 80px;
        right: 16px;
        left: 16px;
    }

    .update-content {
        flex-direction: column;
        gap: 12px;
        text-align: center;
        padding: 16px;
    }

    .update-content button {
        width: 100%;
        padding: 12px;
    }
}
