html, body{
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    color: white;
    user-select: none;
}

body::after{
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.03'/%3E%3C/svg%3E");
}

#background {
    position: fixed;
    inset: 0;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background: #000;
    background-size: cover;
    background-position: center;
    z-index: -2;
    transition: 0.4s ease;
}

/* topbar styles */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 32px;
    padding: 0 14px;
    padding-top: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(40px) saturate(200%);
    border-bottom: 1px solid rgba(255,255,255,0.18);
    font-size: 14px;
    letter-spacing: 0.4px;
    z-index: 50;
    color: white;
    box-shadow: 0 3px 20px rgba(0,0,0,0.25);
}

.top-date{
    max-width: 130px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 20px;
}

.top-time{
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* window styles */
.window {
    background: linear-gradient(to bottom, rgba(255,255,255,0.16), rgba(255,255,255,0.1));
    backdrop-filter: blur(45px) saturate(220%);
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,0.22);
    box-shadow: 0 20px 45px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.25);
    position: absolute;
    display: none;
    flex-direction: column;
    color: white;
    animation: fadeIn 0.25s cubic-bezier(.2,.8,.2,1);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, -48%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}

.window {
    width: 460px;
    height: 340px;
    padding: 18px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.window-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    margin-bottom: 8px;
    cursor: grab;
}

.close-btn {
    width: 12px;
    height: 12px;
    background: #ff5f57;
    border-radius: 50%;
    border: none;
    cursor: pointer;
}

.window-content{
    width: 100%;
    flex: 1;
    padding-bottom: 14px;
    box-sizing: border-box;
    overflow: hidden;
}

/* dock styles */
.dock {
    position: fixed;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    height: 68px;
    padding: 6px 8px;
    display: flex;
    gap: 6px;
    align-items: center;
    border-radius: 20px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(60px) saturate(180%);
    border: 0.5px solid rgba(255,255,255,0.3);
    box-shadow: 0 8px 32px rgba(0,0,0,0.37), inset 0 1px 0 rgba(255,255,255,0.25), 0 1px 0 rgba(255,255,255,0.1);
    z-index: 40;
}

.dock-icon {
    width: 52px;
    height: 52px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(.34,1.56,.64,1);
    transform-origin: center center;
}

.dock-icon::before{
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.3), rgba(255,255,255,0.1));
    border-radius: 15px;
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 4px 16px rgba(255,255,255,0.2), inset 0 1px 0 rgba(255,255,255,0.4);
    transition: all 0.3s cubic-bezier(.34,1.56,.64,1);
    z-index: -1;
}

.dock-icon svg{
    width: 32px;
    height: 32px;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    transition: all 0.3s cubic-bezier(.34,1.56,.64,1);
}

.dock-icon:hover {
    transform: translateY(-16px) scale(1.25);
}

.dock-icon:hover::before{
    background: linear-gradient(135deg, rgba(255,255,255,0.35), rgba(255,255,255,0.15));
    box-shadow: 0 8px 24px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.4);
}

.dock-icon:hover svg{
    transform: scale(1.05);
}

.dock-icon.bouncing{
    animation: bounce 0.3s cubic-bezier(.34,1.56,.64,1);
}

@keyframes bounce {
    0% { transform: translateY(0px) scale(1); }
    15% { transform: translateY(-20px) scale(1.15); }
    30% { transform: translateY(-28px) scale(1.25); }
    45% { transform: translateY(-32px) scale(1.3); }
    60% { transform: translateY(-28px) scale(1.25); }
    75% { transform: translateY(-22px) scale(1.15); }
    90% { transform: translateY(-2px) scale(1.02); }
    100% { transform: translateY(0px) scale(1); }
}

.dock:hover .dock-icon{
    transform: scale(1.0);
}

.dock-icon:hover ~ .dock-icon{
    transform: scale(1.1) translateY(-4px);
}

.dock-icon:has(~ .dock-icon:hover){
    transform: scale(1.1) translateY(-4px);
}

/* settings styles */
.settings-wrapper{
    display: flex;
    height: 100%;
    width: 100%;
    overflow: hidden;
    border-radius: 16px;
}

.settings-left{
    width: 120px;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(40px) saturate(180%);
    border-right: 1px solid rgba(255,255,255,0.15);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-radius: 14px 0 0 14px;
}

.settings-tab{
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(20px);
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    color: rgba(255,255,255,0.85);
    transition: 0.2s ease;
}

.settings-tab:hover{
    background: rgba(255,255,255,0.20);
}

.settings-tab.active{
    background: rgba(255,255,255,0.32);
    border: 1px solid rgba(255,255,255,0.25);
    color: white;
}

.settings-right{
    flex: 1;
    padding: 20px;
    overflow: hidden;

    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(50px) saturate(200%);
    border-radius: 0 14px 14px 0;
}

.settings-right h2{
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 600;
}

.settings-page {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.settings-page.hidden{
    display: none;
}

.bg-preview{
    width: 100%;
    height: 120px;
    background: rgba(255,255,255,0.16);
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 14px;
    backdrop-filter: blur(20px);
}

.btn{
    padding: 10px 14px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(18px);
    color: white;
    cursor: pointer;
    font-size: 14px;
    transition: 0.2s ease;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.25);
}

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

.btn:hover{
    background: rgba(255,255,255,0.35);
}

.bg-btns{
    display: flex;
    gap: 10px;
}

.bg-btns .btn{
    flex: 1;
    text-align: center;
}

.file-btn{
    display: inline-block;
    padding: 10px 14px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(20px);
    color: white;
    cursor: pointer;
    font-size: 14px;
    transition: 0.2s ease;
}

.file-btn:hover{
    background: rgba(255,255,255,0.35);
}

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

/* weather styles */
#weather-window{
    width: 650px;
    height: 460px;
    flex-direction: column;
    justify-content: space-between;
    padding: 18px;
}

.weather-container{
    display: flex;
    flex-direction: column;
    gap: 14px;
    height: 100%;
    color: white;
    justify-content: space-between;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.weather-container.loading{
    opacity: 0.3;
    transform: scale(0.98);
}

.weather-header{
    display: flex;
    gap: 10px;
    width: 100%;
    align-items: stretch;
}

.weather-header input{
    flex: 1;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.1);
    color: white;
}

.weather-search{
    position: relative;
    display: flex;
    gap: 10px;
    width: 100%;
    flex-wrap: nowrap;
    align-items: center;
}

.weather-search input {
    width: 100%;
    box-sizing: border-box;
    flex: 1 1 auto;
    min-width: 0;
}

.city-dropdown{
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    max-height: 220px;
    overflow-y: auto;
    background: rgba(30,30,35,0.95);
    backdrop-filter: blur(50px) saturate(180%);
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.18);
    box-shadow: 0 12px 40px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.1);
    z-index: 100;
    display: none;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    padding: 6px;
}

.city-dropdown.show{
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.city-dropdown::-webkit-scrollbar{
    width: 8px;
}

.city-dropdown::-webkit-scrollbar-track{
    background: transparent;
    margin: 8px 0;
}

.city-dropdown::-webkit-scrollbar-thumb{
    background: rgba(255,255,255,0.3);
    border-radius: 4px;
    transition: background 0.2s ease;
}

.city-dropdown::-webkit-scrollbar-thumb:hover{
    background: rgba(255,255,255,0.4);
}

.city-dropdown div{
    padding: 11px 14px;
    color: white;
    background: rgba(255,255,255,0.08);
    border-radius: 10px;
    margin-bottom: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.18s ease, transform 0.18s ease;
    border: 1px solid transparent;
}

.city-dropdown div:hover{
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.12);
    transform: translateX(2px);
}

.city-dropdown div:active{
    transform: scale(0.98);
    background: rgba(255,255,255,0.22);
}

.weather-current{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.weather-location{
    font-size: 20px;
    font-weight: 600;
}

.weather-main{
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 32px;
    font-weight: 600;
}

.weather-icon{
    width: 64px;
    height: 64px;
}

.weather-hourly{
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 8px;
    border-radius: 14px;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(20px);
    align-items: center;
}

.weather-hourly img {
    width: 28px;
    height: 28px;
    margin: 4px auto;
    display: block;
}

.weather-hourly::-webkit-scrollbar {
    display: none;
}

.hour{
    min-width: 70px;
    text-align: center;
    font-size: 13px;
    color: white;
    opacity: 0.9;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    padding: 6px 4px;
}

.weather-bottom{
    display: flex;
    gap: 14px;
    align-items: flex-end;
}

/* 3 day */
.forecast-3day{
    flex: 1.3;
    padding: 14px;
    border-radius: 16px;
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0.18),
        rgba(255,255,255,0.08)
    );
    backdrop-filter: blur(28px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.forecast-3day .day{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    gap: 6px;
    padding: 8px 6px;
    flex: 1;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    text-align: center;
    transition: transform 0.25s ease, background 0.25s ease;
}

.forecast-3day .day:hover{
    transform: translateY(-4px);
    background: rgba(255,255,255,0.12);
}

.forecast-3day img {
    width: 30px;
    height: 30px;
}

.forecast-3day span:first-child{
    font-size: 12px;
    opacity: 0.8;
    letter-spacing: 0.5px;
}

.forecast-3day span:last-child{
    font-size: 16px;
    font-weight: 600;
}

/* aqi */
.air-quality{
    flex: 0.7;
    padding: 14px;
    border-radius: 14px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.18), rgba(255,255,255,0.08));
    backdrop-filter: blur(28px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    position: relative;
    overflow: hidden;
}

.air-quality .label{
    font-size: 11px;
    opacity: 0.65;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.air-quality .value{
    font-size: 22px;
    line-height: 1.1;
    font-weight: 700;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.air-quality, .forecast-3day{
    min-height: 110px;
}

.aqi-good{
    color: #4ade80;
    text-shadow: 0 0 14px rgba(74, 222, 128, 0.6);
}

.aqi-moderate{
    color: #facc15;
    text-shadow: 0 0 14px rgba(250, 204, 21, 0.6);
}

.aqi-poor{
    color: #fb7185;
    text-shadow: 0 0 14px rgba(251, 113, 133, 0.6);
}

.aqi-very-poor{
    color: #ef4444;
    text-shadow: 0 0 16px rgba(239, 68, 68, 0.7);
}

.aqi-hazardous{
    color: #8b0000;
    text-shadow: 0 0 16px rgba(106, 26, 26, 0.7);
}

/* timer styles */
#timer-window{
    width: 460px;
    height: 380px;
}

.timer-main{
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
    margin-top: 6px;
    margin-bottom: 16px;
    flex: 1;
    position: relative;
}

.timer-content{
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.timer-circle{
    position: relative;
    width: 220px;
    height: 220px;
    margin-top: 10px;
    position: relative;
    filter: drop-shadow(0 12px 32px rgba(0,0,0,0.45));
}

.timer-circle.running::after{
    content: "";
    position: absolute;
    inset: -14px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(167,139,250,0.25), transparent 70%);
    animation: pulse 2.5s ease-in-out infinite;
    z-index: -1;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.1;
    }
}

.progress-ring{
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    overflow: visible;
}

.ring-bg{
    fill: none;
    stroke: rgba(255,255,255,0.25);
    stroke-width: 10;
}

.ring-progress{
    fill: none;
    stroke: url(#timerGradient);
    stroke-width: 12;
    stroke-linecap: round;
    stroke-dasharray: 628;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 0.3s linear;
    filter: drop-shadow(0 0 12px rgba(167,139,250,0.7));
}

.timer-time{
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.45) 0 0 20px rgba(167,139,250,0.7);
}

.timer-btn{
    width: 110px;
    padding: 11px 0;
    border-radius: 24px;
    border: none;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.4px;
    cursor: pointer;
    color: white;
    transition: transform 0.15s ease, background 0.15s ease;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.3) 0 8px 20px rgba(0,0,0,0.35);
}

.timer-btn.primary{
    background: linear-gradient(135deg, #a78bfa, #8b5cf6);
}

.timer-btn.primary:hover{
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.35), 0 0 12px rgba(139,92,246,0.45);
}

.timer-btn.secondary{
    background: rgba(255,255,255,0.18);
}

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

.timer-controls{
    display: flex;
    gap: 14px;
    margin-bottom: 12px;
    margin-top: 6px;
}

.hidden{
    display: none;
}

.timer-picker{
    width: 220px;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timer-picker input{
    width: 140px;
    padding: 10px;
    text-align: center;
    font-size: 18px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.1);
    color: white;
    outline: none;
}

.timer-wheel{
    width: 220px;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wheel{
    height: 160px;
    width: 100%;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    text-align: center;
    scrollbar-width: none;
    scroll-behavior: smooth;
}

.wheel::-webkit-scrollbar{
    display: none;
}

.wheel-item{
    height: 40px;
    line-height: 40px;
    font-size: 22px;
    color: rgba(255,255,255,0.4);
    scroll-snap-align: center;
}

.wheel-item.active{
    color: white;
    font-size: 26px;
}

.wheel-item, .wheel-spacer{
    height: 40px;
    line-height: 40px;
}