@import url("https://fonts.googleapis.com/css2?family=Barlow:wght@300;400;500;600&display=swap");

:root {
    --metal-dark: #0a1628;
    --metal-blue: #1a2f4a;
    --metal-cyan: #2d4a5c;
    --accent-teal: #00d9ff;
    --accent-green: #00ff88;
}


.appHeader {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, var(--metal-dark) 0%, var(--metal-blue) 100%);
    border-bottom: 1px solid rgba(0,217,255,0.25);
    box-shadow: 0 4px 24px rgba(0,0,0,0.4);
    transition: transform 0.3s ease;
}

.title {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.weatherIcon {
    width: 42px;
    height: 42px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(0,217,255,0.4));
}


.searchWrapper {
    flex: 1;
    position: relative;
    max-width: 420px;
}

.searchInputRow {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(0,217,255,0.3);
    border-radius: 14px;
    padding: 0 10px;
    gap: 8px;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.searchInputRow:focus-within {
    border-color: var(--accent-teal);
    background: rgba(0,217,255,0.08);
    box-shadow: 0 0 0 3px rgba(0,217,255,0.12);
}

.searchIcon {
    color: rgba(255,255,255,0.35);
    font-size: 0.85rem;
    flex-shrink: 0;
    transition: color 0.2s;
}

.searchInputRow:focus-within .searchIcon {
    color: var(--accent-teal);
}

#getCity {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: white;
    font-family: "Barlow", sans-serif;
    font-size: 0.95rem;
    padding: 11px 0;
    min-width: 0;
}

#getCity::placeholder {
    color: rgba(255,255,255,0.35);
}


.gpsBtnHeader {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(0,217,255,0.2), rgba(0,255,136,0.15));
    border: 1px solid rgba(0,217,255,0.4);
    color: var(--accent-teal);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,217,255,0.2);
}

.gpsBtnHeader:hover {
    background: linear-gradient(135deg, rgba(0,217,255,0.35), rgba(0,255,136,0.25));
    transform: scale(1.08);
    box-shadow: 0 4px 16px rgba(0,217,255,0.4);
}

.gpsBtnHeader:active { transform: scale(0.95); }

.gpsBtnHeader.loading i {
    animation: gpsSpin 1s linear infinite;
    color: var(--accent-green);
}

@keyframes gpsSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}


.searchDropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0; right: 0;
    background: linear-gradient(160deg, #0d1e35, #1a2f4a);
    border: 1px solid rgba(0,217,255,0.3);
    border-radius: 16px;
    list-style: none;
    margin: 0; padding: 6px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(0,217,255,0.1);
    z-index: 2000;
    max-height: 320px;
    overflow-y: auto;


    display: none;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.searchDropdown.open {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: dropdownIn 0.2s ease;
}

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

.dropdownItem {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s;
    border: 1px solid transparent;
}

.dropdownItem:hover,
.dropdownItem.active {
    background: rgba(0,217,255,0.12);
    border-color: rgba(0,217,255,0.2);
}

.dropdownFlag {
    font-size: 1.3rem;
    flex-shrink: 0;
    line-height: 1;
}

.dropdownText {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.dropdownText strong {
    font-size: 0.95rem;
    color: white;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdownText small {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.45);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdownCoords {
    font-size: 0.68rem;
    color: rgba(0,217,255,0.45);
    flex-shrink: 0;
    font-family: monospace;
}


.searchDropdown::-webkit-scrollbar { width: 4px; }
.searchDropdown::-webkit-scrollbar-track { background: transparent; }
.searchDropdown::-webkit-scrollbar-thumb { background: rgba(0,217,255,0.3); border-radius: 2px; }


.hamburger-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    flex-shrink: 0;
    border-radius: 8px;
    transition: background 0.2s;
}

.hamburger-btn:hover { background: rgba(255,255,255,0.08); }

.hamburger-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger-btn.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(4px);
    z-index: 1100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.sidebar-overlay.show { opacity: 1; pointer-events: all; }


.sidebar {
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    width: min(300px, 85vw);
    background: linear-gradient(180deg, #0a1628 0%, #1a2f4a 60%, #2d4a5c 100%);
    border-right: 1px solid rgba(0,217,255,0.2);
    z-index: 1200;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 32px rgba(0,0,0,0.5);
    overflow-y: auto;
}
.sidebar.open { transform: translateX(0); }

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 16px 16px;
    border-bottom: 1px solid rgba(0,217,255,0.15);
}

.sidebar-logo {
    width: 34px;
    height: 34px;
    object-fit: contain;
    filter: drop-shadow(0 0 6px rgba(0,217,255,0.4));
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    flex: 1;
}

.sidebar-close {
    background: rgba(255,255,255,0.08);
    border: none;
    border-radius: 8px;
    color: white;
    width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
}
.sidebar-close:hover { background: rgba(255,71,87,0.3); }

.sidebar-section-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.3);
    padding: 16px 16px 6px;
}

.sidebar-nav {
    list-style: none;
    padding: 0 8px;
    margin-bottom: 4px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-radius: 10px;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-size: 0.95rem;
    transition: background 0.2s, color 0.2s;
    margin-bottom: 2px;
}

.sidebar-link i {
    width: 18px;
    text-align: center;
    color: rgba(0,217,255,0.6);
    flex-shrink: 0;
}

.sidebar-link span { flex: 1; }

.sidebar-link:hover,
.sidebar-link.active {
    background: rgba(0,217,255,0.12);
    color: white;
}
.sidebar-link:hover i,
.sidebar-link.active i { color: var(--accent-teal); }

.sidebar-badge {
    background: linear-gradient(135deg, var(--accent-teal), var(--accent-green));
    color: #0a1628;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 6px;
    letter-spacing: 0.5px;
    flex: 0 !important;
}

.sidebar-footer {
    margin-top: auto;
    padding: 16px;
    border-top: 1px solid rgba(0,217,255,0.12);
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.72rem;
    color: rgba(255,255,255,0.25);
}


@media (max-width: 480px) {
    .appHeader { padding: 10px 12px; gap: 8px; }
    .weatherIcon { width: 34px; height: 34px; }
    .dropdownCoords { display: none; }
    #getCity { font-size: 0.9rem; }
}

@media (max-width: 360px) {
    .searchWrapper { max-width: none; }
}




.settingsBtnHeader {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    color: rgba(255,255,255,0.8);
    width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 1rem;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
}
.settingsBtnHeader:hover { background: rgba(0,217,255,0.15); color: #00d9ff; }

.settings-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 8000;
    opacity: 0; pointer-events: none;
    transition: opacity 0.25s;
}
.settings-overlay.show { opacity: 1; pointer-events: all; }

.settings-panel {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: min(300px, 88vw);
    background: linear-gradient(160deg, #0a1628 0%, #1a2f4a 100%);
    border-left: 1px solid rgba(0,217,255,0.2);
    z-index: 8001;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
    display: flex; flex-direction: column;
    box-shadow: -8px 0 32px rgba(0,0,0,0.4);
}
.settings-panel.open { transform: translateX(0); }

.settings-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(0,217,255,0.15);
    font-size: 1.05rem; font-weight: 600; color: #fff;
}
.settings-header i { color: #00d9ff; margin-right: 8px; }
.settings-close-btn {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 50%; color: #fff;
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 0.95rem;
    transition: background 0.2s;
}
.settings-close-btn:hover { background: rgba(255,71,87,0.35); }

.settings-section { padding: 20px; }

.settings-label {
    display: block;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 12px;
}
.settings-label i { color: #00d9ff; margin-right: 6px; }

.lang-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.lang-btn {
    display: flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 10px 12px;
    cursor: pointer;
    color: rgba(255,255,255,0.75);
    font-size: 0.85rem;
    transition: all 0.2s;
    font-family: inherit;
}
.lang-btn:hover { background: rgba(0,217,255,0.1); border-color: rgba(0,217,255,0.3); color: #fff; }
.lang-btn.active { background: rgba(0,217,255,0.15); border-color: rgba(0,217,255,0.6); color: #00d9ff; font-weight: 600; }
.lang-flag { font-size: 1.25rem; line-height: 1; }
.lang-name { font-size: 0.82rem; }