* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background: #0f172a;
    background: linear-gradient(135deg, #020617 0%, #0f172a 50%, #1e3a8a 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
    color: #ffffff;
    transition: background 0.8s ease-in-out;
}

.app-container {
    width: 100%;
    max-width: 440px;
}

.screen {
    width: 100%;
}

.hidden {
    display: none !important;
}

/* Structural Animation Layer */
.animate-fade {
    animation: fadeInElement 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInElement {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Premium Ultra-Glassmorphism Cards */
.main-display-card, .info-card, .grid-card, .error-card, .discovery-menu {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 20px;
    margin-bottom: 14px;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding: 0 4px;
}

.logo {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -1.2px;
}

.tagline {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

.pill-toggle {
    background: rgba(255, 255, 255, 0.12);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
}

/* Search Bar Formatting UI */
.search-section {
    margin-bottom: 20px;
}

.search-bar {
    display: flex;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 20px;
    padding: 4px 6px;
    align-items: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.search-bar input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 14px;
    font-size: 16px;
    color: #0f172a;
    outline: none;
    font-weight: 500;
}

.search-icon-btn {
    background: #e2e8f0;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 16px;
    cursor: pointer;
    font-size: 15px;
}

.loader {
    text-align: center;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin: 20px 0;
    font-style: italic;
}

/* Custom Onboarding/Home State Architecture */
.home-landing-center {
    text-align: center;
    padding: 24px 10px 40px 10px;
}

.giant-globe {
    font-size: 64px;
    margin-bottom: 14px;
    display: inline-block;
}

.search-prompt-text {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 20px;
    font-weight: 500;
}

.shortcut-pills-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    max-width: 360px;
    margin: 0 auto;
}

.pill-shortcut {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pill-shortcut:hover {
    background: rgba(255, 255, 255, 0.24);
    transform: translateY(-1px);
}

/* Results Formatting Architecture */
.results-meta-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 0 4px;
}

.location-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
    letter-spacing: -0.2px;
}

.close-view-link {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
}

.close-view-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.weather-hero {
    text-align: center;
}

.weather-icon {
    font-size: 52px;
    margin-bottom: 4px;
}

.hero-temp {
    font-size: 68px;
    font-weight: 700;
    display: inline-block;
    line-height: 1;
    letter-spacing: -2px;
}

.unit-label {
    font-size: 28px;
    font-weight: 400;
    vertical-align: super;
    letter-spacing: normal;
}

.condition-label {
    font-size: 18px;
    font-weight: 500;
    margin-top: 4px;
}

.feels-like {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 2px;
}

/* Metric Display Layout Grid */
.card-title-tiny {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 10px;
}

.advice-content {
    display: flex;
    gap: 14px;
    align-items: center;
}

.clothing-icon {
    font-size: 34px;
}

.advice-content h4 {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
}

.advice-content p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 1px;
}

/* NEW: Activity Styles matching reference list row cards */
.activity-headline-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.activity-main-icon {
    font-size: 28px;
}

#activity-headline {
    font-size: 15px;
    font-weight: 600;
}

.activity-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.activity-list li {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Details Grid layout properties */
.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}

.details-grid .grid-card {
    margin-bottom: 0;
    padding: 16px;
}

.grid-card.highlight {
    background: rgba(30, 58, 138, 0.25);
    border-color: rgba(59, 130, 246, 0.3);
}

.grid-value-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.emoji-indicator {
    font-size: 24px;
}

.grid-value-row h3 {
    font-size: 16px;
    font-weight: 700;
}

.grid-value-row p {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

/* Explore Extremes Section & Buttons */
.discovery-menu-container {
    margin-top: 20px;
}

.discovery-menu {
    margin-bottom: 0;
    padding: 10px;
}

.section-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.4);
    margin: 8px 0 12px 10px;
}

.menu-item {
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    margin-bottom: 10px;
    width: 100%;
    text-align: left;
    padding: 16px 20px;
    color: #ffffff;
}

.menu-item:last-child {
    margin-bottom: 0;
}

.menu-item.cold-row {
    background: linear-gradient(90deg, #0a1f3d 0%, #10375c 40%, #001024 100%);
}

.menu-item.hot-row {
    background: linear-gradient(90deg, #601004 0%, #941c06 45%, #420700 100%);
}

.menu-item.slush-row {
    background: linear-gradient(90deg, #022c22 0%, #065f46 45%, #021410 100%);
}

.menu-item:hover {
    transform: scale(1.01);
    filter: brightness(1.15);
}

.menu-emoji {
    font-size: 24px;
    margin-right: 16px;
}

.menu-text {
    flex: 1;
}

.menu-text h3 {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.menu-text p {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
}

.arrow {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.3);
}

/* Extremes Subscreens Content Structure */
.view-screen {
    border-radius: 28px;
    padding: 24px;
}

.back-navigation {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: white;
    padding: 8px 14px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 13px;
    margin-bottom: 20px;
    font-weight: 500;
}

.view-title {
    font-size: 28px;
    font-weight: 900;
    text-align: center;
    letter-spacing: -0.5px;
}

.view-subtitle {
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
    margin-bottom: 24px;
}

.leaderboard {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.leader-item {
    margin-bottom: 0;
}

.leader-header {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 4px;
}

.leader-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.badge {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
}

.badge.cold-badge { background: #3b82f6; }
.badge.hot-badge { background: #ef4444; }
.badge.slush-badge { background: #10b981; }

.sub-cond {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

.human-quote {
    font-size: 13px;
    font-style: italic;
    color: rgba(255, 255, 255, 0.8);
}

.fact-callout {
    margin-top: 20px;
    font-size: 12px;
    line-height: 1.45;
}

.fact-callout strong {
    display: block;
    margin-bottom: 2px;
}

.alert-border { border-color: rgba(239, 68, 68, 0.3); background: rgba(239, 68, 68, 0.08); }
.warning-border { border-color: rgba(245, 158, 11, 0.3); background: rgba(245, 158, 11, 0.08); }

.error-card {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.25);
    text-align: center;
    font-size: 14px;
    font-weight: 500;
}