:root {
    --glass-bg: rgba(255, 255, 255, 0.05);
    --text-main: #ffffff;
    --text-dim: rgba(255, 255, 255, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
}

/* 禁止所有元素的触屏高亮 */
* {
    -webkit-tap-highlight-color: transparent;
}


body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    color: var(--text-main);
    background-color: #1a1a2e;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    transition: background-image 0.8s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
    z-index: -1;
    pointer-events: none;
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    gap: 60px;
    padding: 20px;
}

/* 白净磨砂玻璃卡片 - 边框已设为透明 */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    border: 1px solid transparent;
    border-radius: 24px;
    padding: 25px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.left-panel {
    width: 380px;
}

.profile {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 12px;
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.7);
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.logo-text {
    font-size: 2.4rem;
    font-weight: bold;
    font-style: italic;
    letter-spacing: 1px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.logo-text span {
    font-size: 1.8rem;
    font-weight: bold;
    opacity: 0.9;
}

.quote-box {
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 0;
}

.hello-world {
    font-weight: bold;
    display: block;
    margin-bottom: 8px;
    color: #fff;
    font-size: 1.1rem;
}

.right-panel {
    width: 480px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.top-row {
    display: flex;
    gap: 15px;
}

.info-card,
.clock-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 120px;
    text-align: center;
}

.clock-card #time {
    font-size: 2.2rem;
    font-weight: bold;
    margin: 5px 0;
    letter-spacing: 2px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.clock-card #date {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.music-player {
    position: relative;
}

.track-info {
    margin-bottom: 15px;
    text-align: center;
}

.title {
    font-size: 1.1rem;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.artist {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-top: 5px;
}

.progress-container {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    cursor: pointer;
    margin: 10px 0;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: #fff;
    border-radius: 4px;
    position: relative;
}

.music-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 36px;
    margin-top: 12px;
}

.music-controls i {
    cursor: pointer;
    font-size: 1.3rem;
    transition: 0.2s;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.music-controls i:hover {
    transform: scale(1.2);
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 8px;
}

.grid-item {
    background: transparent !important;
    backdrop-filter: none !important;
    padding: 14px 5px;
    border-radius: 16px;
    text-align: center;
    font-size: 0.85rem;
    cursor: pointer;
    transition: transform 0.2s, text-shadow 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    border: none;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.grid-item:hover {
    background: transparent !important;
    transform: translateY(-2px);
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
}

.grid-item i,
.grid-item .glyphicon {
    font-size: 1.4rem;
}

/* 统一 glyphicon 图标的垂直对齐与大小表现 */
.grid-item .glyphicon {
    font-size: 1.4rem;
    top: 2px;
    display: inline-block;
    vertical-align: middle;
}

.grid-item .custom-svg-icon svg {
    width: 1.4rem;
    height: 1.4rem;
    display: block;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.2));
}

/* Glyphicon 独立样式 (仅提取所需，不影响全局布局) */
@font-face {
    font-family: 'Glyphicons Halflings';
    src: url('https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/fonts/glyphicons-halflings-regular.woff2') format('woff2'),
        url('https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/fonts/glyphicons-halflings-regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

.glyphicon {
    position: relative;
    top: 1px;
    display: inline-block;
    font-family: 'Glyphicons Halflings';
    font-style: normal;
    font-weight: normal;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.glyphicon-envelope:before {
    content: "\2709";
}

/* 兼容性微调：保证图标与文字视觉对齐 */
.glyphicon {
    vertical-align: middle;
    margin-right: 2px;
}

.social-links {
    display: flex;
    gap: 24px;
    margin-top: 20px;
    font-size: 1.4rem;
    justify-content: center;
}

.social-links i {
    cursor: pointer;
    transition: 0.2s;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.social-links i:hover {
    transform: scale(1.15);
    color: #fff;
    text-shadow: 0 0 4px white;
}

/* ========= 移动端优化：格言卡片与时间卡片并排显示，背景支持横向滑动看完整壁纸 ========= */
@media screen and (max-width: 800px) {
    body {
        background-size: auto 100% !important;
        background-attachment: scroll !important;
        background-position: center center;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    html {
        overflow-x: auto;
    }

    .container {
        flex-direction: column;
        justify-content: flex-start;
        gap: 12px;
        padding: 12px 16px;
        overflow-y: auto;
        height: auto;
        min-height: 100vh;
    }

    body {
        overflow-y: auto;
    }

    .left-panel,
    .right-panel {
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
    }

    .left-panel {
        margin-top: 4px;
    }

    .profile {
        margin-bottom: 8px;
        gap: 6px;
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }

    .avatar {
        margin-right: 0;
        margin-bottom: 0;
    }

    .logo-text {
        font-size: 2rem;
    }

    .glass-card {
        padding: 16px;
    }

    .right-panel {
        gap: 12px;
    }

    .top-row {
        display: flex;
        flex-direction: row !important;
        gap: 12px;
        margin-bottom: 0;
    }

    .info-card {
        display: flex !important;
        flex: 1;
        min-height: auto;
        padding: 16px;
        justify-content: center;
        align-items: center;
        text-align: center;
    }

    .clock-card {
        display: flex !important;
        flex: 1;
        width: auto;
        min-height: auto;
        padding: 16px;
        justify-content: center;
        align-items: center;
    }

    .info-card p {
        font-size: 0.85rem;
        line-height: 1.5;
        word-break: break-word;
        margin: 0;
    }

    .info-card small {
        font-size: 0.7rem;
        display: block;
        margin-top: 6px;
        opacity: 0.85;
    }

    .clock-card #time {
        font-size: 1.6rem;
        margin: 0 0 4px 0;
        letter-spacing: 1px;
    }

    .clock-card #date {
        font-size: 0.7rem;
        white-space: nowrap;
    }

    .track-info {
        margin-bottom: 8px;
    }

    .progress-container {
        margin: 6px 0;
    }

    .music-controls {
        margin-top: 6px;
        gap: 28px;
    }

    .grid {
        gap: 8px;
        margin-top: 4px;
    }

    .grid-item {
        padding: 10px 3px;
        font-size: 0.8rem;
        gap: 4px;
    }

    .grid-item i,
    .grid-item .glyphicon {
        font-size: 1.3rem;
    }

    .grid-item .custom-svg-icon svg {
        width: 1.3rem;
        height: 1.3rem;
    }

    .social-links {
        margin-top: 10px;
        gap: 20px;
    }

    .quote-box {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    .hello-world {
        margin-bottom: 4px;
    }

    .music-controls i {
        font-size: 1.4rem;
    }
}

@media screen and (max-width: 480px) {
    .container {
        padding: 10px 12px;
        gap: 10px;
    }

    .glass-card {
        padding: 14px;
    }

    .top-row {
        gap: 8px;
    }

    .info-card,
    .clock-card {
        padding: 12px !important;
    }

    .clock-card #time {
        font-size: 1.4rem;
    }

    .clock-card #date {
        font-size: 0.65rem;
        white-space: normal;
        word-break: keep-all;
    }

    .info-card p {
        font-size: 0.75rem;
    }

    .info-card small {
        font-size: 0.65rem;
        margin-top: 4px;
    }

    .grid-item {
        padding: 8px 2px;
        font-size: 0.75rem;
    }

    .grid-item i,
    .grid-item .glyphicon {
        font-size: 1.2rem;
    }

    .grid-item .custom-svg-icon svg {
        width: 1.2rem;
        height: 1.2rem;
    }

    .music-controls {
        gap: 24px;
    }

    .track-info .title {
        font-size: 1rem;
    }

    .track-info .artist {
        font-size: 0.75rem;
    }
}

.autoplay-hint {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    padding: 6px 14px;
    border-radius: 40px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.95);
    pointer-events: none;
    z-index: 100;
    white-space: nowrap;
    font-family: monospace;
    letter-spacing: 0.5px;
    transition: opacity 0.5s;
}

@media (max-width: 600px) {
    .autoplay-hint {
        font-size: 0.6rem;
        bottom: 10px;
        white-space: nowrap;
    }
}