@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,400;14..32,500;14..32,600;14..32,700;14..32,800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
    --bg: #0b223c;
    --bg-gradient: radial-gradient(ellipse at 50% 0%, #173e6a 0%, #0b223c 75%);
    --card: rgba(18, 45, 78, 0.82);
    --card-solid: #122d4e;
    --card-hover: rgba(26, 60, 102, 0.9);
    --border: rgba(65, 115, 170, 0.45);
    --border-light: rgba(255, 255, 255, 0.12);
    --border-accent: rgba(16, 185, 129, 0.5);
    --text: #ffffff;
    --text-secondary: #cbd5e1;
    --text-tertiary: #94a3b8;
    
    --accent: #10b981;
    --accent-glow: rgba(16, 185, 129, 0.3);
    --accent-dim: rgba(16, 185, 129, 0.16);
    
    --warning: #fbbf24;
    --danger: #f87171;
    --excellent: #10b981;
    --good: #38bdf8;
    --fair: #fbbf24;
    --poor: #f87171;
    
    --glass-bg: rgba(18, 45, 78, 0.78);
    --glass-blur: blur(14px);
    --shadow-sm: 0 4px 12px rgba(5, 18, 35, 0.25);
    --shadow-md: 0 10px 30px rgba(4, 15, 30, 0.35);
    --shadow-glow: 0 0 24px rgba(16, 185, 129, 0.2);
    
    --radius-lg: 20px;
    --radius: 16px;
    --radius-sm: 12px;
    --radius-xs: 8px;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    height: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    font-optical-sizing: auto;
    background: var(--bg);
    background-image: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text);
    line-height: 1.5;
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    overflow-x: hidden;
}

#fish-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.app {
    position: relative;
    z-index: 1;
    max-width: 1120px;
    margin: 0 auto;
    padding: 24px 20px 48px;
}

/* ================================ */
/* Header                           */
/* ================================ */
header {
    margin-bottom: 24px;
    padding-top: 8px;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 32px;
    line-height: 1;
    filter: drop-shadow(0 2px 8px rgba(16, 185, 129, 0.3));
    transition: transform 0.3s var(--ease);
}

.logo-icon:hover {
    transform: scale(1.1) rotate(-8deg);
}

.logo-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

h1 {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
}

.tagline {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.3;
}

.header-guide-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 16px;
    border-radius: 24px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s var(--ease);
    box-shadow: var(--shadow-sm);
    min-height: 42px;
}

.header-guide-link:hover {
    background: var(--card-hover);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-1px);
    box-shadow: var(--shadow-glow);
}

.header-guide-link:active {
    transform: scale(0.97);
}

/* ================================ */
/* Panel - shared card style       */
/* ================================ */
.panel {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-md);
    transition: border-color 0.2s var(--ease);
}

.panel:hover {
    border-color: rgba(30, 58, 95, 0.9);
}

/* ================================ */
/* Map section                      */
/* ================================ */
.map-section {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-md);
}

.map-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
}

.map-header-title h2 {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text);
}

.micro-hint-bar {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 10px;
}

.micro-hint-bar strong {
    color: var(--accent);
}

.coast-notice {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #fbbf24;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-sm);
}

.preset-locations-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.geo-btn {
    background: var(--accent-dim) !important;
    border-color: var(--accent) !important;
    color: var(--accent) !important;
    font-weight: 700 !important;
}

.geo-btn:hover {
    background: var(--accent) !important;
    color: #040c18 !important;
    box-shadow: var(--shadow-glow);
}

.map-hint {
    font-size: 12px;
    color: var(--text-tertiary);
}

.location-search-wrap {
    position: relative;
    min-width: 260px;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 12px;
    font-size: 14px;
    pointer-events: none;
    opacity: 0.6;
}

.spot-search {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 14px 10px 36px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    transition: all 0.2s var(--ease);
}

.spot-search:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: rgba(15, 23, 42, 0.85);
}

.spot-search::placeholder {
    color: var(--text-tertiary);
}

.spot-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: rgba(13, 27, 46, 0.96);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    max-height: 280px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
}

.spot-dropdown-item {
    padding: 12px 16px;
    cursor: pointer;
    font-size: 14px;
    min-height: 46px;
    display: flex;
    align-items: center;
    transition: background 0.15s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

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

.spot-dropdown-item:hover,
.spot-dropdown-item:active {
    background: var(--accent-dim);
    color: var(--accent);
}

#map {
    width: 100%;
    height: 380px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 14px;
    z-index: 1;
    border: 1px solid var(--border-light);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.map-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Leaflet overrides */
.leaflet-container {
    background: #0d2745 !important;
}

.leaflet-tile-pane {
    filter: brightness(1.02) contrast(1.05);
}

.leaflet-control-zoom {
    border: none !important;
    box-shadow: var(--shadow-md) !important;
}

.leaflet-control-zoom a {
    background: rgba(18, 45, 78, 0.9) !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
    backdrop-filter: blur(8px);
    width: 36px !important;
    height: 36px !important;
    line-height: 36px !important;
    font-size: 16px !important;
    border-radius: 10px !important;
    margin-bottom: 4px !important;
}

.leaflet-control-layers {
    background: rgba(18, 45, 78, 0.9) !important;
    backdrop-filter: blur(12px);
    border: 1px solid var(--border) !important;
    color: var(--text) !important;
    border-radius: var(--radius-sm) !important;
    padding: 8px 12px !important;
    box-shadow: var(--shadow-md) !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 12px !important;
    font-weight: 600 !important;
}

.leaflet-control-layers-toggle {
    background-color: rgba(18, 45, 78, 0.9) !important;
    border-radius: 8px !important;
    width: 36px !important;
    height: 36px !important;
}

.leaflet-control-attribution {
    background: rgba(11, 34, 60, 0.85) !important;
    color: var(--text-tertiary) !important;
    font-size: 10px !important;
    backdrop-filter: blur(4px);
    border-top-left-radius: 6px;
    padding: 2px 8px !important;
}

.leaflet-control-attribution a {
    color: var(--accent) !important;
}

.leaflet-popup-content-wrapper {
    background: rgba(18, 45, 78, 0.95) !important;
    backdrop-filter: blur(12px);
    color: var(--text) !important;
    border-radius: var(--radius-sm) !important;
    border: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5) !important;
}

.leaflet-popup-tip {
    background: rgba(13, 27, 46, 0.95) !important;
}

.leaflet-popup-content {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    margin: 14px 16px;
}

/* Map markers */
.score-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 12px;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.25);
    cursor: pointer;
    transition: transform 0.2s var(--ease), box-shadow 0.2s;
    font-family: 'JetBrains Mono', monospace;
    font-feature-settings: 'tnum';
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.score-marker:hover {
    transform: scale(1.18);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
}

.score-marker:active {
    transform: scale(0.95);
}

.score-marker-active {
    transform: scale(1.22);
    border-color: #ffffff;
    box-shadow: 0 0 0 4px var(--accent-glow), 0 8px 20px rgba(0, 0, 0, 0.6);
}

.selected-marker {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid white;
    animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes pulse-ring {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
    }
    70% {
        box-shadow: 0 0 0 12px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.popup-score {
    font-size: 24px;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    font-feature-settings: 'tnum';
}

.popup-label {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Preset location pills */
.preset-locations {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.loc-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    font-weight: 500;
    transition: all 0.2s var(--ease);
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.loc-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.2);
}

.loc-btn:active {
    transform: scale(0.96);
}

.loc-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #040c18;
    font-weight: 700;
    box-shadow: var(--shadow-glow);
}

/* Shared input style */
.custom-location {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.custom-location input {
    flex: 1;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.15s;
}

.custom-location input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.coord-details summary {
    font-size: 13px;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 6px 0;
    user-select: none;
    font-weight: 500;
    transition: color 0.15s;
}

.coord-details summary:hover {
    color: var(--text-secondary);
}

.coord-error {
    font-size: 12px;
    color: var(--danger);
    margin-top: 6px;
}

.btn-primary {
    background: var(--accent);
    color: #040c18;
    border: none;
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: inherit;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.2s var(--ease);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow);
    min-height: 42px;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 0 24px rgba(16, 185, 129, 0.3);
}

.btn-primary:active {
    transform: scale(0.97);
}

/* Loading */
.loading {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-secondary);
    font-size: 14px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 0 auto 12px;
}

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

.hidden {
    display: none !important;
}

/* Error banner */
.error-banner {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--danger);
    font-size: 14px;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.15s;
    white-space: nowrap;
    min-height: 40px;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-secondary:active {
    transform: scale(0.97);
}

/* ================================ */
/* Score Hero - summary strip       */
/* ================================ */
.score-hero {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 24px;
    align-items: center;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.score-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--good), var(--warning));
    opacity: 0.8;
}

.score-circle {
    position: relative;
    width: 112px;
    height: 112px;
    flex-shrink: 0;
    margin: 0 auto;
}

.score-circle svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.score-bg {
    fill: none;
    stroke: var(--border);
    stroke-width: 6;
}

.score-fill {
    fill: none;
    stroke: var(--excellent);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 326.7;
    stroke-dashoffset: 326.7;
    transition: stroke-dashoffset 0.8s var(--ease), stroke 0.3s;
}

.score-center-wrap {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    text-align: center;
}

.score-value {
    font-size: 32px;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    font-feature-settings: 'tnum';
    line-height: 1;
    letter-spacing: -0.02em;
}

.score-label {
    font-size: 10px;
    color: var(--text-secondary);
    white-space: nowrap;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 3px;
}

.score-meta h2 {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
    color: var(--text);
}

.best-time-text {
    color: var(--accent);
    font-size: 14px;
    margin-bottom: 12px;
    font-family: 'JetBrains Mono', monospace;
    font-feature-settings: 'tnum';
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.meta-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.chip {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ================================ */
/* Two-column results grid          */
/* ================================ */
.results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.results-col-left,
.results-col-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Section headings */
.panel > h2,
.section-header h2 {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 16px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ================================ */
/* Best hours                       */
/* ================================ */
.best-hours {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.best-hour-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 10px;
    text-align: center;
    transition: all 0.2s var(--ease);
}

.best-hour-card:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-2px);
}

.best-hour-card:first-child {
    border-color: var(--accent-glow);
    background: var(--accent-dim);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.1);
}

.best-hour-time {
    font-size: 18px;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    font-feature-settings: 'tnum';
}

.best-hour-score {
    font-size: 13px;
    font-weight: 700;
    margin-top: 2px;
}

.best-hour-conditions {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 4px;
    font-weight: 500;
}

/* ================================ */
/* Seasonal fish                    */
/* ================================ */
.fish-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
}

.fish-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-top: 3px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 10px;
    text-align: center;
    transition: all 0.2s var(--ease);
}

.fish-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
}

.fish-illustration {
    width: 64px;
    height: 44px;
    margin: 0 auto 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fish-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.fish-name {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text);
}

.fish-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-bottom: 4px;
}

.fish-category {
    font-size: 11px;
    color: var(--text-tertiary);
    font-weight: 500;
}

.fish-efficiency {
    color: var(--text-secondary);
    margin-top: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    font-feature-settings: 'tnum';
}

.efficiency-bar {
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-top: 6px;
    overflow: hidden;
}

.efficiency-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.6s var(--ease);
}

/* ================================ */
/* Conditions                       */
/* ================================ */
.condition-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.condition-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px;
    transition: background 0.15s;
}

.condition-card:hover {
    background: rgba(255, 255, 255, 0.06);
}

.condition-card .cc-icon {
    font-size: 18px;
    margin-bottom: 4px;
}

.condition-card .cc-label {
    font-size: 11px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}

.condition-card .cc-value {
    font-size: 22px;
    font-weight: 800;
    margin-top: 2px;
    font-family: 'JetBrains Mono', monospace;
    font-feature-settings: 'tnum';
    letter-spacing: -0.02em;
    color: var(--text);
}

.condition-card .cc-note {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
    font-weight: 500;
}

/* ================================ */
/* Factors                          */
/* ================================ */
.factors-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.factor-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-xs);
    font-size: 13px;
    transition: background 0.15s;
}

.factor-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.factor-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.factor-impact {
    margin-left: auto;
    font-weight: 800;
    font-size: 13px;
    font-family: 'JetBrains Mono', monospace;
    padding: 2px 8px;
    border-radius: 6px;
}

.factor-positive {
    color: var(--excellent);
    background: rgba(16, 185, 129, 0.12);
}

.factor-negative {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.12);
}

.factor-neutral {
    color: var(--text-tertiary);
    background: rgba(255, 255, 255, 0.06);
}

/* ================================ */
/* Hourly details & Telegram        */
/* ================================ */
.hourly-details,
.telegram-details {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.hourly-summary,
.telegram-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    cursor: pointer;
    list-style: none;
    transition: background 0.15s;
    user-select: none;
}

.hourly-summary:hover,
.telegram-summary:hover {
    background: rgba(255, 255, 255, 0.03);
}

.hourly-summary::-webkit-details-marker,
.telegram-summary::-webkit-details-marker {
    display: none;
}

.hourly-summary h2,
.telegram-summary h2 {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
}

.expand-hint {
    font-size: 13px;
    color: var(--text-tertiary);
    font-weight: 500;
}

.hourly-details[open] .expand-hint,
.telegram-details[open] .expand-hint {
    display: none;
}

.hourly-forecast {
    padding: 0 24px 24px;
}

.hourly-forecast h2 {
    display: none;
}

.chart-container {
    height: 90px;
    display: flex;
    align-items: flex-end;
    gap: 3px;
    margin-bottom: 18px;
    padding-top: 10px;
}

.chart-bar {
    flex: 1;
    border-radius: 4px 4px 0 0;
    min-height: 4px;
    position: relative;
    cursor: pointer;
    transition: opacity 0.15s;
}

.chart-bar:hover {
    opacity: 0.75;
}

.chart-bar .bar-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(13, 27, 46, 0.95);
    border: 1px solid var(--border);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    white-space: nowrap;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.chart-bar:hover .bar-tooltip {
    display: block;
}

.hourly-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.hourly-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}

.hourly-table th {
    padding: 10px 14px;
    color: var(--text-tertiary);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
    background: rgba(13, 27, 46, 0.95);
}

.hourly-table td {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(30, 58, 95, 0.4);
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-feature-settings: 'tnum';
    color: var(--text-secondary);
}

.hourly-table tr {
    transition: background 0.1s;
}

.hourly-table tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.hourly-table .best-row {
    background: var(--accent-dim);
}

.score-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 11px;
}

/* Telegram form */
.telegram-section {
    padding: 0 24px 24px;
}

.telegram-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tg-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tg-field label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.tg-field input[type="text"],
.tg-field select {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.15s;
}

.tg-field input[type="text"]:focus,
.tg-field select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.tg-field select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.tg-field input[type="range"] {
    accent-color: var(--accent);
    width: 100%;
    height: 4px;
}

.tg-range-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.tg-range-row input[type="range"] {
    flex: 1;
}

.tg-threshold-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    font-weight: 800;
    color: var(--accent);
    font-feature-settings: 'tnum';
    min-width: 32px;
}

.tg-btn {
    align-self: flex-start;
    padding: 12px 28px;
    font-size: 14px;
}

.tg-status {
    font-size: 13px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    background: var(--accent-dim);
    color: var(--accent);
    line-height: 1.4;
    font-weight: 500;
}

.tg-status.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

/* Section header with link */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-header h2 {
    margin-bottom: 0 !important;
}

.section-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    transition: opacity 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.section-link:hover {
    opacity: 0.8;
}

/* ================================ */
/* Fish Guide (fihrist)             */
/* ================================ */
.guide-app {
    max-width: 1120px;
}

.guide-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    min-height: 42px;
    transition: opacity 0.15s;
}

.guide-back:hover {
    opacity: 0.8;
}

.guide-controls {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
}

.guide-filter-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary);
    min-width: 68px;
    flex-shrink: 0;
}

.filter-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}

.guide-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 8px 18px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    font-weight: 500;
    transition: all 0.2s var(--ease);
    min-height: 38px;
    display: inline-flex;
    align-items: center;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

.filter-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #040c18;
    font-weight: 700;
    box-shadow: var(--shadow-glow);
}

.guide-count {
    font-size: 14px;
    color: var(--accent);
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.guide-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
    padding: 14px 20px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}

.guide-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    text-align: center;
    transition: all 0.25s var(--ease);
    box-shadow: var(--shadow-sm);
}

.guide-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-md);
}

.guide-illust {
    width: 96px;
    height: 60px;
    margin: 0 auto 12px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-xs);
    display: flex;
    align-items: center;
    justify-content: center;
}

.guide-name {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text);
}

.guide-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 12px;
}

.guide-cat {
    font-size: 12px;
    color: var(--text-tertiary);
    font-weight: 500;
}

.guide-season-block {
    margin-bottom: 12px;
}

.guide-month-labels {
    display: flex;
    justify-content: center;
    gap: 3px;
    margin-bottom: 3px;
}

.month-label {
    width: 14px;
    text-align: center;
    font-size: 8px;
    font-weight: 600;
    color: var(--text-tertiary);
}

.guide-seasons {
    display: flex;
    justify-content: center;
    gap: 3px;
}

.season-dot {
    width: 14px;
    height: 6px;
    border-radius: 2px;
    background: var(--border);
    transition: transform 0.2s var(--ease);
}

.season-dot.on {
    opacity: 1;
}

.guide-regions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
}

.region-tag {
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 10px;
    border: 1px solid;
    white-space: nowrap;
}

/* Footer */
footer {
    text-align: center;
    padding: 24px 0 12px;
    color: var(--text-tertiary);
    font-size: 12px;
    font-weight: 400;
}

/* ================================ */
/* Accessibility                    */
/* ================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    .score-fill {
        transition: none;
    }
}

/* ========================================================================== */
/* MOBILE & RESPONSIVE DESIGN (Comprehensive & Ultra-Polished)                */
/* ========================================================================== */

@media (max-width: 1023px) {
    .results-grid {
        grid-template-columns: 1fr;
    }
    .condition-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    /* Prevent auto zoom on iOS text inputs */
    input[type="text"],
    input[type="number"],
    select,
    button {
        font-size: 16px !important;
    }

    .app {
        padding: 16px 14px max(32px, env(safe-area-inset-bottom));
    }

    /* Header */
    header {
        margin-bottom: 16px;
        padding-top: 4px;
    }

    .header-container {
        gap: 10px;
    }

    .logo-icon {
        font-size: 26px;
    }

    h1 {
        font-size: 20px;
    }

    .tagline {
        font-size: 11px;
    }

    .header-guide-link {
        padding: 6px 12px;
        font-size: 12px;
        min-height: 38px;
    }

    .header-guide-link .link-text {
        display: none;
    }

    .header-guide-link::after {
        content: ' Rehber';
    }

    /* Map section */
    .map-section {
        padding: 16px;
        border-radius: var(--radius);
        margin-bottom: 14px;
    }

    .map-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .location-search-wrap {
        min-width: 100%;
    }

    .spot-search {
        padding: 12px 14px 12px 38px;
        min-height: 48px;
    }

    #map {
        height: 260px;
        border-radius: var(--radius-sm);
        margin-bottom: 12px;
    }

    /* Scrollable horizontal presets */
    .preset-locations {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        padding-bottom: 4px;
        margin: 0 -4px;
    }

    .preset-locations::-webkit-scrollbar {
        display: none;
    }

    .loc-btn {
        flex-shrink: 0;
        scroll-snap-align: start;
        padding: 8px 16px;
        font-size: 13px;
        min-height: 40px;
        border-radius: 20px;
    }

    .custom-location {
        flex-direction: column;
        gap: 8px;
    }

    .custom-location input {
        min-height: 48px;
    }

    .btn-primary {
        min-height: 48px;
        font-size: 15px;
        width: 100%;
    }

    /* Hero score section */
    .score-hero {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 20px 16px;
        text-align: center;
        border-radius: var(--radius);
        margin-bottom: 14px;
    }

    .score-circle {
        width: 96px;
        height: 96px;
    }

    .score-value {
        font-size: 28px;
    }

    .score-label {
        font-size: 9px;
    }

    .score-meta {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .score-meta h2 {
        font-size: 20px;
    }

    .best-time-text {
        font-size: 13px;
        margin-bottom: 10px;
        justify-content: center;
    }

    .meta-chips {
        justify-content: center;
    }

    /* Results layout flow */
    .results-grid {
        display: flex;
        flex-direction: column;
        gap: 14px;
        margin-bottom: 14px;
    }

    .results-col-left,
    .results-col-right {
        gap: 14px;
    }

    .panel {
        padding: 16px;
        border-radius: var(--radius);
    }

    .panel > h2,
    .section-header h2 {
        font-size: 15px;
        margin-bottom: 12px;
    }

    /* Conditions 2-column compact grid on mobile */
    .condition-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .condition-card {
        padding: 12px 10px;
    }

    .condition-card .cc-icon {
        font-size: 16px;
        margin-bottom: 2px;
    }

    .condition-card .cc-label {
        font-size: 10px;
    }

    .condition-card .cc-value {
        font-size: 18px;
    }

    .condition-card .cc-note {
        font-size: 10px;
    }

    /* Best hours horizontal scroll on mobile */
    .best-hours {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        gap: 8px;
        padding-bottom: 4px;
    }

    .best-hours::-webkit-scrollbar {
        display: none;
    }

    .best-hour-card {
        flex-shrink: 0;
        width: 115px;
        scroll-snap-align: start;
        padding: 12px 8px;
    }

    .best-hour-time {
        font-size: 16px;
    }

    .best-hour-score {
        font-size: 12px;
    }

    /* Seasonal fish carousel on mobile */
    .fish-grid {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        gap: 8px;
        padding-bottom: 4px;
    }

    .fish-grid::-webkit-scrollbar {
        display: none;
    }

    .fish-card {
        flex-shrink: 0;
        width: 120px;
        scroll-snap-align: start;
        padding: 12px 8px;
    }

    .fish-illustration {
        width: 52px;
        height: 38px;
    }

    .fish-name {
        font-size: 12px;
    }

    /* Factors list */
    .factor-item {
        padding: 10px 12px;
        font-size: 12px;
        gap: 10px;
    }

    .factor-icon {
        font-size: 14px;
    }

    /* Hourly details & Sticky Table on mobile */
    .hourly-details,
    .telegram-details {
        border-radius: var(--radius);
        margin-bottom: 14px;
    }

    .hourly-summary,
    .telegram-summary {
        padding: 14px 16px;
        min-height: 48px;
    }

    .hourly-summary h2,
    .telegram-summary h2 {
        font-size: 15px;
    }

    .expand-hint {
        font-size: 12px;
    }

    .hourly-forecast {
        padding: 0 16px 16px;
    }

    .chart-container {
        height: 64px;
        margin-bottom: 12px;
    }

    .hourly-table-wrap {
        position: relative;
    }

    .hourly-table th:first-child,
    .hourly-table td:first-child {
        position: sticky;
        left: 0;
        background: #0d1b2e;
        z-index: 2;
        box-shadow: 2px 0 6px rgba(0, 0, 0, 0.4);
    }

    .hourly-table th {
        padding: 8px 10px;
        font-size: 10px;
    }

    .hourly-table td {
        padding: 8px 10px;
        font-size: 11px;
    }

    /* Telegram form */
    .telegram-section {
        padding: 0 16px 16px;
    }

    .tg-field input[type="text"],
    .tg-field select {
        min-height: 48px;
        padding: 12px 14px;
    }

    .tg-btn {
        width: 100%;
        min-height: 48px;
    }

    /* Guide Mobile styling */
    .guide-controls {
        gap: 12px;
    }

    .guide-filter-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .filter-label {
        min-width: auto;
    }

    .guide-filters {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        width: 100%;
        padding-bottom: 4px;
    }

    .guide-filters::-webkit-scrollbar {
        display: none;
    }

    .filter-btn {
        flex-shrink: 0;
        scroll-snap-align: start;
        min-height: 40px;
        padding: 8px 16px;
        font-size: 13px;
    }

    .guide-legend {
        padding: 12px 14px;
        gap: 10px;
        margin-bottom: 16px;
    }

    .guide-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-bottom: 24px;
    }

    .guide-card {
        padding: 12px 10px;
        border-radius: var(--radius-sm);
    }

    .guide-illust {
        width: 72px;
        height: 48px;
        margin-bottom: 8px;
    }

    .guide-name {
        font-size: 13px;
    }

    .month-label {
        width: 10px;
        font-size: 7px;
    }

    .season-dot {
        width: 10px;
        height: 5px;
    }
}

@media (max-width: 380px) {
    .score-circle {
        width: 84px;
        height: 84px;
    }

    .score-value {
        font-size: 24px;
    }

    .score-meta h2 {
        font-size: 18px;
    }

    .best-hour-card {
        width: 100px;
    }

    .fish-card {
        width: 106px;
    }

    .guide-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}