@import url('./mdui.min.css');

@font-face {
    font-family: 'Material Icons';
    font-style: normal;
    font-weight: 400;
    src: url(./flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2) format('woff2');
}

.material-icons {
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
}

iframe {
    border: none;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: rgba(var(--mdui-color-on-surface-variant), 0.3);
    border: 2px solid transparent;
    background-clip: padding-box;
    border-radius: 10px;
    transition: background-color 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background-color: rgba(var(--mdui-color-primary), 0.5);
}

::-webkit-scrollbar-thumb:active {
    background-color: rgb(var(--mdui-color-primary));
}

::-webkit-scrollbar-corner {
    background: transparent;
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--mdui-color-on-surface-variant), 0.3) transparent;
}

/* 基础样式 */
body,
html {
    margin: 0;
    padding: 0;
    height: 100dvh;
    width: 100vw;
    overflow: hidden;
    background-color: rgb(var(--mdui-color-surface-container-low));
    font-family: 'Roboto', sans-serif;
    transition: background-color 0.5s;
    user-select: none;
}

mdui-layout {
    display: grid;
    grid-template-rows: auto 1fr auto;
    height: 100dvh;
    width: 100%;
}

mdui-top-app-bar {
    position: relative;
}

mdui-list {
    padding: 5px;
}

.list {
    grid-row: 2;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 0;
    background-color: rgb(var(--mdui-color-surface-container-low));
    scroll-behavior: smooth;
}

.desktop-sidebar {
    display: none;
}

.mdui-circular-progress-overlay {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
    z-index: 10;
    border-radius: 28px;
}

.footer-container {
    grid-row: 3;
    background-color: rgb(var(--mdui-color-surface));
    border-top: 1px solid rgb(var(--mdui-color-outline-variant));
}

/* 桌面端布局 */
@media (min-width: 1024px) {
    mdui-layout {
        grid-template-columns: auto 1fr;
        grid-template-rows: 1fr;
    }

    .desktop-sidebar {
        grid-column: 1;
        grid-row: 1;
        display: flex;
        border-right: 1px solid rgb(var(--mdui-color-outline-variant));
    }

    .sidebar-footer {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding: 16px 8px;
    }

    .weather-info {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        padding: 8px 0;
        color: rgb(var(--mdui-color-on-surface));
    }

    .weather-location {
        font-size: 12px;
        font-weight: 500;
        opacity: 0.8;
    }

    .weather-temp {
        font-size: 18px;
        font-weight: 600;
        color: rgb(var(--mdui-color-primary));
        cursor: pointer;
    }

    .weather-desc {
        font-size: 11px;
        opacity: 0.7;
    }

    .page-container {
        grid-column: 2;
        grid-row: 1;
        height: 100dvh;
        overflow-y: auto;
        background-color: rgb(var(--mdui-color-surface-container-low));
        position: relative;
    }

    .footer-container {
        display: none;
    }
}

/* 天气详情卡片 */
.weather-detail-card {
    padding: 16px 0;
}

.weather-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding: 20px;
    background: linear-gradient(135deg, rgb(var(--mdui-color-primary-container)) 0%, rgb(var(--mdui-color-secondary-container)) 100%);
    border-radius: 16px;
    color: rgb(var(--mdui-color-on-primary-container));
}

.weather-city-temp {
    flex: 1;
}

.weather-city {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 4px;
}

.weather-main-temp {
    font-size: 32px;
    font-weight: 300;
    margin-bottom: 4px;
}

.weather-condition {
    font-size: 16px;
    opacity: 0.9;
}

.weather-icon-large mdui-icon {
    font-size: 64px;
    opacity: 0.8;
}

.weather-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.weather-detail-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background-color: rgb(var(--mdui-color-surface-container-highest));
    border-radius: 12px;
    border: 1px solid rgb(var(--mdui-color-outline-variant));
}

.weather-detail-item mdui-icon {
    color: rgb(var(--mdui-color-primary));
    font-size: 24px;
}

.detail-label {
    font-size: 12px;
    color: rgb(var(--mdui-color-on-surface-variant));
    margin-bottom: 2px;
}

.detail-value {
    font-size: 16px;
    font-weight: 500;
    color: rgb(var(--mdui-color-on-surface));
}

.weather-living-section {
    border-top: 1px solid rgb(var(--mdui-color-outline-variant));
    padding-top: 20px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 16px;
    font-weight: 500;
    color: rgb(var(--mdui-color-primary));
}

.living-indices {
    display: grid;
    gap: 8px;
}

.living-index-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background-color: rgb(var(--mdui-color-surface-container));
    border-radius: 8px;
    border: 1px solid rgb(var(--mdui-color-outline-variant));
}

.living-index-name {
    font-size: 14px;
    font-weight: 500;
}

.living-index-value {
    font-size: 13px;
    font-weight: 500;
}

.living-index-desc {
    font-size: 12px;
    color: rgb(var(--mdui-color-on-surface-variant));
    margin-top: 4px;
}