/* Main CSS - Import modular stylesheets */

/* Core styles */
@import url('variables.css');
@import url('base.css');
@import url('sidebar.css');
@import url('nineties-mode.css');
@import url('map.css');
@import url('overlays.css');
@import url('dashboard.css');
@import url('controls.css');
@import url('animations.css');
@import url('mobile.css');

/* Remaining page-specific styles not extracted to modules */

/* Colored Bar */
.colored-bar {
    height: 10px;
    background-color: var(--usu-blue);
    margin-bottom: 20px;
    width: 100%;
    position: relative;
    z-index: 2;
}

/* Homepage Header */
.homepage-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    border-bottom: 3px solid var(--usu-light-gray);
    background: linear-gradient(135deg, rgba(0, 38, 58, 0.02) 0%, rgba(98, 124, 139, 0.02) 100%);
    border-radius: 12px;
    position: relative;
    z-index: 2;
    gap: 2rem;
}

.site-title {
    font-size: 3.2rem;
    font-weight: 800;
    color: var(--usu-blue);
    margin: 0 0 0.5rem 0;
    text-shadow: 2px 2px 4px rgba(0, 38, 58, 0.1);
    letter-spacing: -1px;
}

.site-logo {
    width: clamp(180px, 20vw, 300px);
    height: auto;
    margin-left: clamp(1%, 5vw, 5%);
    flex-shrink: 0;
    border-radius: 8px;
    /* Enhanced fade on edges - more aggressive transparency */
    -webkit-mask-image: radial-gradient(ellipse 85% 75% at 50% 50%, black 40%, transparent 95%);
    mask-image: radial-gradient(ellipse 85% 75% at 50% 50%, black 40%, transparent 95%);
    /* Add subtle shadow for depth */
    filter: drop-shadow(0 4px 12px rgba(0, 38, 58, 0.15));
    transition: all 0.3s ease;
}

.headlines-dashboard {
    flex: 1;
    max-width: 650px;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 38, 58, 0.08);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
    transition: all 0.3s ease;
}

.dashboard-tabs {
    display: flex;
    gap: 0.5rem;
    flex: 1;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0.5rem;
}

.town-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(0, 38, 58, 0.03) 0%, rgba(98, 124, 139, 0.03) 100%);
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.town-selector label {
    color: var(--usu-blue);
    font-size: 1rem;
    display: flex;
    align-items: center;
}

.town-dropdown {
    padding: 0.5rem 0.75rem;
    border: 2px solid var(--usu-light-gray);
    border-radius: 6px;
    background: white;
    color: var(--usu-blue);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.town-dropdown:hover {
    border-color: var(--usu-blue);
    background: rgba(0, 38, 58, 0.02);
}

.town-dropdown:focus {
    outline: none;
    border-color: var(--usu-blue);
    box-shadow: 0 0 0 3px rgba(0, 38, 58, 0.1);
}

.dashboard-tabs .tab-button {
    padding: 0.6rem 1.2rem;
    background: transparent;
    border: none;
    color: var(--usu-blue);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.dashboard-tabs .tab-button:hover {
    background: rgba(0, 38, 58, 0.05);
}

.dashboard-tabs .tab-button.active {
    background: var(--usu-blue);
    color: white;
}

.dashboard-tabs .tab-button i {
    font-size: 0.9rem;
}

.tab-panel {
    display: none;
}

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

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

.headline-items {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.875rem;
}

.headline-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem;
    background: #f9fafb;
    border-radius: 8px;
    border-left: 4px solid #94a3b8;
    transition: all 0.3s ease;
}

.headline-item:hover {
    background: #f1f5f9;
    transform: translateX(2px);
}

.headline-item.good {
    border-left-color: #22c55e;
}

.headline-item.good .headline-icon {
    color: #22c55e;
}

.headline-item.caution {
    border-left-color: #f59e0b;
}

.headline-item.caution .headline-icon {
    color: #f59e0b;
}

.headline-item.warning {
    border-left-color: #ef4444;
}

.headline-item.warning .headline-icon {
    color: #ef4444;
}

.headline-icon {
    font-size: 1.6rem;
    color: #64748b;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.headline-text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1;
}

.headline-label {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.headline-value {
    font-size: 1.1rem;
    color: var(--usu-blue);
    font-weight: 600;
}

.ai-summary-box {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 8px;
    padding: 1.5rem;
    border-left: 4px solid #0ea5e9;
}

.ai-summary-text {
    margin: 0;
    line-height: 1.7;
    color: #0f172a;
    font-size: 1rem;
}

.ai-summary-text i {
    color: #0ea5e9;
    margin-right: 0.5rem;
}

.site-subtitle {
    font-size: 1.3rem;
    color: var(--usu-accent);
    margin: 0;
    font-weight: 400;
    opacity: 0.9;
    line-height: 1.4;
}

/* Center Bar */
.center-bar {
    height: 2px;
    background-color: #000;
    margin: 20px auto;
    width: 80%;
}

/* Container Styles */
.container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* Tab Styles */
.tab {
    text-decoration: none;
    margin: 10px;
    transition: transform 0.3s ease;
}

.tab:hover {
    transform: scale(1.1);
}

/* Latest Post Section */
.post {
    margin: 20px auto;
    padding: 20px;
    max-width: 800px;
    background-color: #f5f5f5;
    border-radius: 5px;
    z-index: 2;
    position: relative;
}

/* Disclaimer Styles */
.overlay-container .disclaimer {
    padding: 15px;
    font-size: 0.75rem;
    color: var(--usu-light-gray);
    background-color: var(--usu-blue);
    border-radius: 5px;
    margin-top: 10px;
}

.outlook-content .disclaimer {
    padding: 15px;
    font-size: 0.75rem;
    color: var(--usu-light-gray);
    background-color: var(--usu-blue);
    border-radius: 5px;
    margin-top: 20px;
}

.post .disclaimer {
    padding: 15px;
    font-size: 0.75rem;
    color: var(--usu-light-gray);
    background-color: var(--usu-blue);
    border-radius: 5px;
    margin-top: 20px;
}

/* Footer Styles */
.main-footer {
    position: fixed;
    bottom: 0;
    right: 0;
    width: calc(100% - 250px);
    background-color: var(--usu-blue);
    color: white;
    text-align: center;
    padding: 15px 20px;
    z-index: 1000;
    margin-left: 250px;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-content p {
    margin: 0;
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Header */
.header {
    text-align: center;
}

/* Visualization Container */
.visualization-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 38, 58, 0.1);
    padding: 1.5rem;
    margin: 2rem 0;
    min-height: 500px;
    position: relative;
    z-index: 2;
}

/* Add subtle gradient overlays */
.visualization-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 0%, rgba(0, 38, 58, 0.02) 50%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}

/* Content Layout */
.content {
    margin-left: 270px;
    padding: 2rem;
    width: calc(100vw - 270px);
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

main.content {
    margin-left: 270px;
    padding: 2rem;
    width: calc(100vw - 270px);
    min-height: calc(100vh - 120px);
    box-sizing: border-box;
}

/* Outlook Preview Styling */
.outlook-preview {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 38, 58, 0.1);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.outlook-preview-header {
    color: var(--usu-blue);
    border-bottom: 2px solid var(--usu-light-gray);
    padding-bottom: 10px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

/* Forecast Panel Specific */
.forecast-panel {
    border-left: 4px solid var(--usu-light-blue);
}

.forecast-container-dashboard {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.outlook-preview-date {
    color: var(--usu-accent);
    font-size: 0.9rem;
    font-style: italic;
    margin-bottom: 1rem;
    text-align: center;
    padding: 0.5rem;
    background: rgba(0, 38, 58, 0.05);
    border-radius: 6px;
}

.outlook-preview-content {
    flex: 1;
    line-height: 1.6;
    color: var(--usu-blue);
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid rgba(0, 38, 58, 0.1);
    overflow-y: auto;
}

.outlook-preview-link {
    text-align: right;
}

.outlook-preview-link a {
    display: inline-block;
    color: white;
    background-color: var(--usu-blue);
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.2s;
}

.outlook-preview-link a:hover {
    background-color: var(--usu-light-blue);
}

/* Risk level indicators */
.risk-indicator {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-weight: bold;
    margin-right: 8px;
}

.risk-low {
    background-color: #d4edda;
    color: #155724;
}

.risk-moderate {
    background-color: #fff3cd;
    color: #856404;
}

.risk-high {
    background-color: #f8d7da;
    color: #721c24;
}

/* Forecast Tabs */
.forecast-tabs {
    display: flex;
    gap: 0.5rem;
}

.forecast-tab {
    background: rgba(98, 124, 139, 0.1);
    border: 1px solid rgba(98, 124, 139, 0.3);
    color: var(--usu-blue);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.forecast-tab:hover {
    background: rgba(98, 124, 139, 0.2);
    transform: translateY(-1px);
}

.forecast-tab.active {
    background: var(--usu-blue);
    color: white;
    border-color: var(--usu-blue);
}

.forecast-tab i {
    font-size: 0.8rem;
}

/* Forecast Content */
.forecast-content {
    display: none;
    flex-direction: column;
    height: 100%;
}

.forecast-content.active {
    display: flex;
}

.outlook-preview-content.compact {
    font-size: 0.85rem;
    line-height: 1.5;
    padding: 0.8rem;
}

.forecast-link {
    text-align: center;
    margin-top: 1rem;
}

.forecast-link a {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--usu-light-blue);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    background: rgba(98, 124, 139, 0.1);
    transition: all 0.2s ease;
}

.forecast-link a:hover {
    background: var(--usu-light-blue);
    color: white;
    transform: translateY(-1px);
}

/* Compact Map Legend */
.map-legend-compact {
    position: relative;
    text-align: center;
    margin-top: 0.5rem;
}

.legend-toggle {
    background: rgba(0, 38, 58, 0.1);
    border: 1px solid rgba(0, 38, 58, 0.2);
    color: var(--usu-blue);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    justify-content: center;
}

.legend-toggle:hover {
    background: rgba(0, 38, 58, 0.15);
    transform: translateY(-1px);
}

.legend-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border: 1px solid rgba(0, 38, 58, 0.2);
    border-radius: 6px;
    padding: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 38, 58, 0.15);
    z-index: 100;
    min-width: 200px;
    margin-top: 0.3rem;
}

.legend-dropdown.active {
    display: block;
}

.legend-items-compact {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.legend-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    gap: 0.5rem;
}

.legend-row .legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.legend-row span {
    flex: 1;
    text-align: left;
    color: var(--usu-blue);
    font-weight: 500;
}

.legend-section-header {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--usu-blue);
    text-align: center;
    margin: 0.5rem 0 0.3rem 0;
    padding-bottom: 0.2rem;
    border-bottom: 1px solid rgba(0, 38, 58, 0.2);
}

.legend-section-header:first-child {
    margin-top: 0;
}

.legend-diamond {
    transform: rotate(45deg);
    border-radius: 0 !important;
}

/* Dashboard Section Spacing */
.dashboard-section {
    margin-bottom: 1.5rem;
}

/* =================
   EASTER EGGS
   ================= */

/* Base Easter Egg Styles */
.easter-egg-toggle {
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
}

.easter-egg-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.easter-egg-toggle i {
    transition: transform 0.3s ease;
    font-size: 0.8rem;
}

.easter-egg-toggle.active i {
    transform: rotate(180deg);
}

.easter-egg-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background: rgba(255, 255, 255, 0.95);
}

.easter-egg-content.active {
    max-height: 120px;
}

.easter-egg-actions {
    padding: 16px;
    display: flex;
    justify-content: center;
}

.toggle-button {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.toggle-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
    background: linear-gradient(135deg, #b91c1c, #dc2626);
}

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

/* Responsive Design - Mobile, Tablet, Laptop, Desktop */

/* Tablet (768px - 1023px) - Sidebar collapses */
@media (min-width: 768px) and (max-width: 1023px) {
    .content {
        margin-left: 0;
        width: 100%;
        padding: 1.5rem;
    }

    main.content {
        margin-left: 0;
    }

    .sidebar_container {
        position: fixed;
        left: -270px;
        transition: left 0.3s ease;
        z-index: 1000;
    }

    .sidebar_container.active {
        left: 0;
    }
}

/* Mobile (< 768px) - Full width, stacked layout */
@media (max-width: 767px) {
    .content {
        margin-left: 0;
        width: 100%;
        padding: 1rem;
    }

    main.content {
        margin-left: 0;
        padding: 1rem;
    }

    .sidebar_container {
        position: fixed;
        left: -270px;
        transition: left 0.3s ease;
        z-index: 1000;
    }

    .sidebar_container.active {
        left: 0;
    }

    /* Stack controls vertically on mobile */
    .controls-grid {
        grid-template-columns: 1fr;
    }

    /* Make action buttons stack */
    .action-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }

    .action-buttons button {
        width: 100%;
    }
}