/**
 * fkno.lol - Weather Reality Check v2.8.5
 * CSS with FIXED gradient system - double circle approach
 * 
 * Changelog:
 * v2.8.5 (current):
 * - FIXED: Double circle gradient system
 * - Full gradient always visible at low opacity
 * - Actual fill shows on top with full opacity
 * - Gradient is STATIC from green to red for ALL circles
 * 
 * v2.8.4:
 * - Icon scaling: 1x, 4x, 6x (50px, 200px, 300px)
 * - 7-color gradient stops (broken - now fixed)
 * 
 * Built with ❤️ by Tomasz Fiedoruk & AI
 * Free for non-commercial use
 */

/* === Reset & Variables === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Main colors */
    --primary-color: #2196F3;
    --danger-color: #F44336;
    --success-color: #4CAF50;
    --warning-color: #FF9800;
    
    /* Text */
    --text-primary: #212121;
    --text-secondary: #757575;
    
    /* Backgrounds */
    --background: #FAFAFA;
    --surface: #FFFFFF;
    
    /* Spacing & sizing */
    --border-radius: 16px;
    --transition-speed: 0.3s;
    --max-width: 480px;
    
    /* Circle sizes */
    --circle-container-mobile: 85vw;
    --circle-container-desktop: 380px;
    
    /* Shadows */
    --shadow-small: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-large: 0 8px 32px rgba(0, 0, 0, 0.16);
}

/* === Base Styles === */
html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* === Main Container === */
.weather-app {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.6s ease-out;
}

/* === Header - MINIMAL spacing === */
.app-header {
    text-align: center;
    padding-top: 5px;
    padding-bottom: 0;
    animation: slideDown 0.8s ease-out;
}

/* Logo with gradient animation */
.logo-text {
    font-family: 'Caveat', cursive;
    font-size: 4rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--danger-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.03em;
    margin: 0;
    padding: 0;
    line-height: 0.9;
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Tagline RIGHT under logo */
.tagline {
    font-family: 'Caveat', cursive;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin: 0;
    padding: 0;
    line-height: 1;
    opacity: 0;
    animation: fadeIn 1s ease-out 0.5s forwards;
}

/* === Percentage Display - CLOSER to tagline === */
.percentage-display {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 0.75rem;
    margin-bottom: 0.5rem;
    opacity: 0;
    animation: fadeIn 0.8s ease-out 0.3s forwards;
}

.percentage-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.percentage-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    background: var(--surface);
    box-shadow: var(--shadow-small);
    transition: all var(--transition-speed);
    cursor: pointer;
    border: 2px solid #E0E0E0;
}

.percentage-circle:hover {
    transform: scale(1.05);
}

.percentage-circle.active {
    transform: scale(1.1);
    box-shadow: var(--shadow-medium);
    border-width: 3px;
}

.percentage-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* === Weather Display === */
.weather-display {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0;
}

/* === Concentric Circles Container === */
.concentric-circles {
    width: var(--circle-container-mobile);
    height: var(--circle-container-mobile);
    max-width: var(--circle-container-desktop);
    max-height: var(--circle-container-desktop);
    position: relative;
    margin: 0 auto 1rem;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.08));
    animation: scaleIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Time circles */
.time-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all var(--transition-speed);
    cursor: pointer;
}

.time-circle[data-active="false"] {
    opacity: 0.3;
}

.time-circle[data-active="false"]:hover {
    opacity: 0.5;
}

.time-circle[data-active="true"] {
    opacity: 1;
}

/* 6h - Outer - 100% */
.time-circle[data-hours="6"] {
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* 3h - Middle - 65% */
.time-circle[data-hours="3"] {
    width: 65%;
    height: 65%;
    z-index: 2;
}

/* 1h - Inner - 35% */
.time-circle[data-hours="1"] {
    width: 35%;
    height: 35%;
    z-index: 3;
}

/* SVG rings */
.time-ring {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.ring-background {
    fill: none;
    stroke: #E0E0E0;
    stroke-width: 20;
    opacity: 0.3;
}

/* NEW: Full gradient ring - always visible */
.ring-gradient-full {
    fill: none;
    stroke-width: 20;
    stroke-linecap: round;
    opacity: 0.2; /* Low opacity to show full scale */
}

/* Actual fill ring */
.ring-fill {
    fill: none;
    stroke: #4CAF50; /* Default green, will be overridden by JS */
    stroke-width: 20;
    stroke-linecap: round;
    stroke-dasharray: 565.48;
    stroke-dashoffset: 565.48;
    transition: stroke-dashoffset 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                stroke 0.3s ease; /* Added transition for color */
    opacity: 0.9;
}

/* Time labels */
.time-label {
    position: absolute;
    font-size: 0.75rem;
    font-weight: 700;
    background: var(--surface);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    box-shadow: var(--shadow-small);
    z-index: 10;
}

.time-circle[data-hours="1"] .time-label {
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
}

.time-circle[data-hours="3"] .time-label {
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
}

.time-circle[data-hours="6"] .time-label {
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
}

/* === Weather icon center - PROGRESSIVE SIZING === */
.weather-icon-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

/* Icon size: 1h base, 3h = 400%, 6h = 600% */
.time-circle[data-hours="1"] .weather-icon-center {
    width: 60px;
    height: 60px;
}

.time-circle[data-hours="3"] .weather-icon-center {
    width: 240px;
    height: 240px;
}

.time-circle[data-hours="6"] .weather-icon-center {
    width: 360px;
    height: 360px;
}

.weather-icon-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Icon container sizes: 50px base, 200px (400%), 300px (600%) */
.time-circle[data-hours="1"] .weather-icon-container {
    width: 50px;
    height: 50px;
}

.time-circle[data-hours="3"] .weather-icon-container {
    width: 200px;
    height: 200px;
}

.time-circle[data-hours="6"] .weather-icon-container {
    width: 300px;
    height: 300px;
}

.weather-icon-container svg,
.weather-icon-container img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
}

/* Weather emoji fallback */
.weather-emoji {
    font-size: 3rem;
    text-align: center;
}

/* === Weather conditions widget === */
.weather-conditions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: var(--surface);
    padding: 0.6rem 1rem;
    border-radius: 24px;
    box-shadow: var(--shadow-medium);
    white-space: nowrap;
    font-size: 1rem;
    font-weight: 600;
    margin: 1rem auto 0.5rem;
    width: fit-content;
}

.weather-condition-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-secondary);
}

.weather-condition-icon {
    width: 28px;
    height: 28px;
    opacity: 0.7;
}

/* Location indicator */
.location-indicator {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0.5rem 0 0.25rem 0;
    opacity: 0;
    animation: fadeIn 1s ease-out 0.7s forwards;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.location-icon {
    font-size: 1rem;
}

/* === Decision Panel === */
.decision-panel {
    text-align: center;
    max-width: 90%;
    margin: 0 auto;
    padding: 0.5rem 0;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.3s forwards;
}

.primary-answer {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

.recommendation {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.humorous-quip {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-style: italic;
    opacity: 0.8;
}

/* === Footer === */
.app-footer {
    text-align: center;
    padding: 1.5rem 0 1rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    opacity: 0;
    animation: fadeIn 1s ease-out 1s forwards;
}

.app-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-speed);
}

.app-footer a:hover {
    text-decoration: underline;
    opacity: 0.8;
}

.dev-stats {
    margin-top: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

.stat-item {
    display: inline-block;
}

.stat-separator {
    margin: 0 0.5rem;
    opacity: 0.5;
}

.api-count, .cache-status, .load-time {
    font-weight: 600;
    color: var(--primary-color);
}

/* === PWA Install Button === */
.install-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 30px;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-medium);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-speed);
    z-index: 100;
}

.install-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-large);
}

/* === Loading States === */
.loading {
    pointer-events: none;
}

.loading .concentric-circles {
    animation: pulse 2s infinite;
}

.loading-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* === Animations === */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* === Notification Toast === */
.notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--surface);
    color: var(--text-primary);
    padding: 1rem 2rem;
    border-radius: 30px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    z-index: 9999;
    animation: slideDown 0.3s ease-out;
}

/* === Media Queries === */
@media (min-width: 768px) {
    .percentage-circle {
        width: 56px;
        height: 56px;
        font-size: 1.125rem;
    }
    
    .primary-answer {
        font-size: 2.25rem;
    }
    
    .recommendation {
        font-size: 1.25rem;
    }
    
    .logo-text {
        font-size: 5rem;
    }
    
    .tagline {
        font-size: 1.4rem;
    }
    
    /* Desktop icon sizes */
    .time-circle[data-hours="1"] .weather-icon-center {
        width: 70px;
        height: 70px;
    }
    
    .time-circle[data-hours="3"] .weather-icon-center {
        width: 280px;
        height: 280px;
    }
    
    .time-circle[data-hours="6"] .weather-icon-center {
        width: 420px;
        height: 420px;
    }
    
    .time-circle[data-hours="1"] .weather-icon-container {
        width: 60px;
        height: 60px;
    }
    
    .time-circle[data-hours="3"] .weather-icon-container {
        width: 240px;
        height: 240px;
    }
    
    .time-circle[data-hours="6"] .weather-icon-container {
        width: 360px;
        height: 360px;
    }
    
    .weather-condition-icon {
        width: 32px;
        height: 32px;
    }
}

/* Smaller phones */
@media (max-width: 360px) {
    .concentric-circles {
        width: 90vw;
        height: 90vw;
    }
    
    .percentage-circle {
        width: 44px;
        height: 44px;
        font-size: 0.875rem;
    }

    .logo-text {
        font-size: 3.5rem;
    }
    
    .tagline {
        font-size: 1.1rem;
    }
    
    .primary-answer {
        font-size: 1.5rem;
    }
    
    .weather-icon-center {
        width: 60px;
        height: 60px;
    }
    
    .weather-icon-container {
        width: 50px;
        height: 50px;
    }
    
    .weather-condition-icon {
        width: 24px;
        height: 24px;
    }
}

/* === Dark Mode Support === */
@media (prefers-color-scheme: dark) {
    :root {
        --background: #121212;
        --surface: #1E1E1E;
        --text-primary: #FFFFFF;
        --text-secondary: #B0B0B0;
        --shadow-small: 0 2px 8px rgba(0, 0, 0, 0.3);
        --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.4);
        --shadow-large: 0 8px 32px rgba(0, 0, 0, 0.5);
    }
    
    .ring-background {
        stroke: #333333;
    }
    
    .notification {
        background: #2A2A2A;
        box-shadow: 0 4px 16px rgba(0,0,0,0.5);
    }
}

/* === Accessibility === */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* === Print Styles === */
@media print {
    .install-btn,
    .dev-stats {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
}