/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #1a1a2e;
    color: #fff;
    overflow-x: hidden;
    min-height: 100vh;
}

/* 背景图片 */
.background-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://pvzh.giantapp.cn/upload/6889920692d000f81701737a/wallpapers/68a0b6fa92d000f817051260/1755359106983_0H6ON.JPG');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
}

/* 主容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* 时间日期容器 */
.time-date-container {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
}

.time {
    font-size: 48px;
    font-weight: 700;
    color: #000;
    text-shadow: 
        -1px -1px 0 #fff,
        1px -1px 0 #fff,
        -1px 1px 0 #fff,
        1px 1px 0 #fff;
    margin-bottom: 8px;
}

.date {
    font-size: 18px;
    color: #000;
    text-shadow: 
        -1px -1px 0 #fff,
        1px -1px 0 #fff,
        -1px 1px 0 #fff,
        1px 1px 0 #fff;
    opacity: 0.9;
}

/* 搜索容器 */
.search-container {
    display: flex;
    justify-content: center;
    margin-bottom: 60px;
    position: relative;
    z-index: 99999;
}

/* 搜索框 */
.search-box {
    display: flex;
    align-items: center;
    width: 600px;
    max-width: 90vw;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    padding: 0 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.search-box:hover {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* 搜索引擎选择器 */
.search-engine-selector {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-right: 15px;
    padding: 8px 12px;
    border-radius: 20px;
    transition: background 0.2s ease;
    z-index: 99999;
}

.search-engine-selector:hover {
    background: rgba(255, 255, 255, 0.1);
}

.search-engine-selector img {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    margin-right: 8px;
}

.dropdown-arrow {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    transition: transform 0.2s ease;
}

.search-engine-selector.active .dropdown-arrow {
    transform: rotate(180deg);
}

/* 搜索引擎下拉菜单 */
.engine-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 8px 0;
    min-width: 160px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    z-index: 99999;
    margin-top: 8px;
}

.engine-dropdown.hidden {
    display: none;
}

.engine-option {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s ease;
    color: #333;
}

.engine-option:hover {
    background: rgba(0, 0, 0, 0.05);
}

.engine-option img {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    margin-right: 12px;
}

/* 搜索输入框 */
#searchInput {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 16px;
    padding: 0 15px;
}

#searchInput::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* 搜索按钮 */
.search-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 22px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: rgba(255, 255, 255, 0.8);
}

.search-button:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: scale(1.05);
}

/* 应用程序网格 */
.app-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 16px;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* 小图标卡片 - 1x1 */
.app-card {
    grid-column: span 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 16px 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 90px;
    text-decoration: none;
    color: #fff;
}

.app-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.3);
}

.app-card .app-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    margin-bottom: 8px;
    object-fit: cover;
}

.app-card .app-name {
    font-size: 11px;
    text-align: center;
    line-height: 1.2;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    max-width: 100%;
    word-wrap: break-word;
}

/* 中图标卡片 - 2x1 */
.medium-card {
    grid-column: span 2;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 80px;
    text-decoration: none;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.medium-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.medium-card {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: rgba(255, 255, 255, 0.2);
}

.medium-card .card-content {
    position: relative;
    z-index: 1;
}

.medium-card .card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.medium-card .card-description {
    font-size: 12px;
    opacity: 0.8;
}

/* 大图标卡片 - 2x2 */
.large-card {
    grid-column: span 2;
    grid-row: span 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 160px;
    text-decoration: none;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.large-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.large-card {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: rgba(255, 255, 255, 0.2);
}

.large-card .card-content {
    position: relative;
    z-index: 1;
}

.large-card .card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.large-card .card-description {
    font-size: 13px;
    opacity: 0.8;
    line-height: 1.4;
}

/* 超大图标卡片 - 4x2 */
.extra-large-card {
    grid-column: span 4;
    grid-row: span 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 160px;
    text-decoration: none;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.extra-large-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.extra-large-card {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: rgba(255, 255, 255, 0.2);
}

.extra-large-card .card-content {
    position: relative;
    z-index: 1;
}

.extra-large-card .card-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.extra-large-card .card-description {
    font-size: 14px;
    opacity: 0.8;
    line-height: 1.4;
}

/* 抽屉式卡片 - 2x2 */
.drawer-card {
    grid-column: span 2;
    grid-row: span 2;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 160px;
}

.drawer-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.drawer-card .drawer-mini-app {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px;
    transition: background 0.2s ease;
    cursor: pointer;
}

.drawer-card .drawer-mini-app:hover {
    background: rgba(255, 255, 255, 0.2);
}

.drawer-card .drawer-mini-app img {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    margin-bottom: 4px;
    object-fit: cover;
}

.drawer-card .drawer-mini-app span {
    font-size: 10px;
    text-align: center;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.drawer-card .drawer-more {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease;
}

.drawer-card .drawer-more:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 抽屉弹窗 */
.drawer-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.drawer-modal.show {
    display: flex;
}

.drawer-modal-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 0;
    max-width: 500px;
    width: 90vw;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.drawer-modal-header {
    display: flex;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.8);
}

.drawer-modal-header img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    margin-right: 12px;
}

.drawer-modal-header .drawer-title {
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.drawer-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.drawer-modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

.drawer-modal-apps {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
}

.drawer-modal-app {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: #333;
}

.drawer-modal-app:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.drawer-modal-app img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    margin-bottom: 8px;
    object-fit: cover;
}

.drawer-modal-app span {
    font-size: 12px;
    text-align: center;
    line-height: 1.2;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 20px 10px;
    }
    
    .time {
        font-size: 36px;
    }
    
    .date {
        font-size: 16px;
    }
    
    .search-box {
        width: 100%;
        max-width: 100%;
    }
    
    .app-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 12px;
    }
    
    .app-card {
        height: 70px;
        padding: 12px 6px;
    }
    
    .app-card .app-icon {
        width: 28px;
        height: 28px;
    }
    
    .app-card .app-name {
        font-size: 10px;
    }
    
    .medium-card, .large-card, .drawer-card {
        grid-column: span 2;
    }
    
    .extra-large-card {
        grid-column: span 4;
    }
    
    .large-card, .drawer-card {
        grid-row: span 2;
        height: 140px;
    }
}

@media (max-width: 480px) {
    .time {
        font-size: 28px;
    }
    
    .date {
        font-size: 14px;
    }
    
    .search-box {
        height: 50px;
        padding: 0 15px;
    }
    
    .search-engine-selector {
        padding: 6px 8px;
        margin-right: 10px;
    }
    
    .search-engine-selector img {
        width: 20px;
        height: 20px;
    }
    
    #searchInput {
        font-size: 14px;
    }
    
    .search-button {
        width: 36px;
        height: 36px;
    }
    
    .app-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    
    .extra-large-card {
        grid-column: span 4;
    }
    
    .copyright-card {
        margin: 30px auto 0 auto;
        padding: 16px;
    }
    
    .copyright-text {
        font-size: 13px;
    }
}

/* 版权展示卡片 */
.copyright-card {
    max-width: 1000px;
    margin: 40px auto 0 auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 1;
}

.copyright-text {
    text-align: center;
    font-weight: 700;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
}
