/* 全局样式 */
@font-face {
    font-family: 'Pacifico';
    src: url('font/Pacifico.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'UnidreamLED';
    src: url('font/UnidreamLED.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

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

body {
    font-family: Arial, sans-serif;
    background-color: #000;
    color: #fff;
    overflow-x: hidden;
}

.controls {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
}

.control-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.control-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* 背景 */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
}

/* 主界面 */
#main {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 20px 0;
    padding-bottom: 80px;
}

.container {
    width: 100%;
    max-width: 1200px;
    padding: 0 20px;
}

.all {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* 每一行的通用样式 */
.row {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 第一行：网站名称 */
.sitename {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    font-weight: bold;
    font-family: 'Pacifico', cursive;
    padding: 20px 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}
.sitename img {
    height: 80px;
}

/* 第二行：百度搜索框 */
.search-box {
    width: 100%;
    padding-bottom: 20px;
}

.baidu-search {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 600px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 8px 16px;
    gap: 12px;
}

.baidu-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.baidu-search input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 16px;
}

.baidu-search input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 第三行：三个卡片 */
.cards-row {
    display: grid;
    grid-template-columns: 2fr 3fr 2fr;
    gap: 20px;
    width: 100%;
}

.info-card {
    background-color: rgba(200, 200, 200, 0.2);
    backdrop-filter: blur(10px);
    padding: 12px 20px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    min-height: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 时间卡片 */
.time-card {
    justify-content: center;
    text-align: center;
}

.date-text {
    font-size: 0.9rem;
    margin-bottom: 8px;
    opacity: 0.9;
}

.time-text {
    font-family: "UnidreamLED";
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 8px;
    letter-spacing: 2px;
}

.lunar-text {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* 一言卡片 */
.hitokoto-card {
    align-items: flex-start;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s;
}

.hitokoto-card:hover {
    background-color: rgba(200, 200, 200, 0.3);
}

.hitokoto-text {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 10px;
    width: 100%;
}

.hitokoto-source {
    font-size: 1rem;
    opacity: 0.8;
    text-align: right;
    width: 100%;
}

/* 音乐卡片 */
.music-card {
    justify-content: center;
    gap: 15px;
}

.music-card .music-row-top {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.music-card .music-cover {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.music-card .music-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.music-card .music-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.music-card .music-info {
    text-align: center;
    width: 100%;
    margin-bottom: 8px;
}

.music-card .music-name {
    font-size: 13px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.music-card .music-control {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.music-card .music-icon {
    font-size: 18px;
    cursor: pointer;
    transition: transform 0.2s;
}

.music-card .music-icon:hover {
    transform: scale(1.1);
}

.music-card .music-state {
    font-size: 28px;
    cursor: pointer;
    transition: transform 0.2s;
}

.music-card .music-state:hover {
    transform: scale(1.1);
}

/* 音乐进度条 */
.music-card .music-progress {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 10px;
}

.music-card .time-current,
.music-card .time-total {
    font-size: 12px;
    opacity: 0.85;
    min-width: 35px;
    text-align: center;
}

.music-card .progress-bar {
    flex: 1;
    height: 6px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    cursor: pointer;
    overflow: hidden;
}

.music-card .progress-fill {
    height: 100%;
    width: 0%;
    background-color: #fff;
    border-radius: 3px;
    transition: width 0.1s linear;
}

/* 第四行：网站列表 */
.site-links {
    width: 100%;
    display: block;
}

.site-title {
    margin-bottom: 16px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-title svg {
    width: 18px;
    height: 18px;
}

.site-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    max-width: 100%;
}

.site-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background-color: rgba(200, 200, 200, 0.2);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, background-color 0.3s ease;
    text-decoration: none;
    color: white;
}

.site-card:hover {
    background: rgba(255, 255, 255, 0.3);
}

.site-icon {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.site-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.site-name {
    font-size: 0.9rem;
    margin: 0;
}

/* 页脚 */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 12px;
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    z-index: 10;
}

.footer-content {
    font-size: 0.9rem;
    color: #ccc;
}

.footer-content a {
    font-size: 0.9rem;
    color: #ccc;
    text-decoration: none;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .cards-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .site-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .all {
        gap: 20px;
    }

    .sitename {
        text-align: center;
        font-size: 3rem;
    }

    .sitename img {
        height: 50px;
    }

    .cards-row {
        grid-template-columns: 1fr;
    }
    
    .site-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .site-card {
        padding: 10px;
        gap: 10px;
    }

    .site-icon {
        width: 32px;
        height: 32px;
    }

    .site-name {
        font-size: 0.8rem;
    }
}