:root {
    --bg-light: #DCE2F1;
    --text-light: #333333;
    --bg-dark: #1a1a1a;
    --text-dark: #ffffff;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    transition: background-color 0.3s, color 0.3s;
}

body.light-theme {
    background-color: var(--bg-light);
    color: var(--text-light);
}

body.dark-theme {
    background-color: var(--bg-dark);
    color: var(--text-dark);
}

body.eye-theme-light-0 {
    background-color: #C7EDCC; /* 绿豆沙 */
    color: #333;
}
body.eye-theme-light-1 {
    background-color: #FFFFFF; /* 银河白 */
    color: #333;
}
body.eye-theme-light-2 {
    background-color: #FAF9DE; /* 杏仁黄 */
    color: #333;
}
body.eye-theme-light-3 {
    background-color: #FFF2E2; /* 秋叶褐 */
    color: #333;
}
body.eye-theme-light-4 {
    background-color: #FDE6E0; /* 胭脂红 */
    color: #333;
}
body.eye-theme-light-5 {
    background-color: #DCE2F1; /* 海天蓝 */
    color: #333;
}
body.eye-theme-light-6 {
    background-color: #E9EBFE; /* 葛巾紫 */
    color: #333;
}
body.eye-theme-light-7 {
    background-color: #EAEAEF; /* 极光灰 */
    color: #333;
}
body.eye-theme-light-8 {
    background-color: #E3EDCD; /* 青草绿 */
    color: #333;
}
body.eye-theme-light-9 {
    background-color: #CCE8CF; /* 电脑管家 */
    color: #333;
}

body.eye-theme-dark-0 {
    background-color: #000000; /* 纯黑色 */
    color: #fff;
}
body.eye-theme-dark-1 {
    background-color: #6E7B6C; /* 深灰色 */
    color: #fff;
}
body.eye-theme-dark-2 {
    background-color: #EAEAEF; /* 极光灰 */
    color: #fff;
}
body.eye-theme-dark-3 {
    background-color: #E3EDCD; /* 青草绿 */
    color: #fff;
}
body.eye-theme-dark-4 {
    background-color: #CCE8CF; /* 电脑管家 */
    color: #fff;
}

body[class^="eye-theme-"] .grid-item {
    background: rgba(255,255,255,0.7);
}
body[class^="eye-theme-"] .welcome {
    color: #4a7a4a;
}

.theme-switch {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 8px;
    z-index: 10;
    justify-content: flex-start;
}

#themeToggle {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    max-width: 32px;
    max-height: 32px;
    margin-right: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#themeToggle:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.dark-theme #themeToggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.sun-icon, .moon-icon {
    fill: currentColor;
}

.light-theme .moon-icon,
.dark-theme .sun-icon {
    display: none;
}

.light-theme #themeToggle { color: #4F8EF7; }
.dark-theme #themeToggle { color: #fff; }

.container {
    max-width: 1200px;
    margin: 60px auto;
    padding: 20px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 24px;
    padding: 20px;
}

.grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
    padding: 16px;
    border-radius: 12px;
    transition: transform 0.2s, background-color 0.2s;
}

.grid-item:hover {
    transform: translateY(-5px);
    background-color: rgba(0, 0, 0, 0.05);
}

.dark-theme .grid-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.grid-item img {
    margin-bottom: 12px;
    transition: transform 0.2s;
}

.grid-item:hover img {
    transform: scale(1.05);
}

.grid-item span {
    font-size: 16px;
    font-weight: 500;
}

.header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 48px;
    margin-bottom: 24px;
}

.title-image {
    max-width: 128px;
    max-height: 128px;
    width: 100%;
    height: auto;
    margin-bottom: 16px;
    display: block;
    background: transparent;
}

.welcome {
    font-size: 1.5rem;
    color: #888;
    margin-bottom: 8px;
    text-align: center;
    letter-spacing: 2px;
    transition: color 0.3s;
}

.dark-theme .welcome {
    color: #ccc;
}

@media (max-width: 600px) {
    .container {
        padding: 4px;
    }
    .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 4px;
    }
    .grid-item {
        padding: 8px;
    }
    .grid-item img {
        width: 72px !important;
        height: 72px !important;
        max-width: 72px;
        max-height: 72px;
    }
    .grid-item span {
        font-size: 13px;
    }
    .header {
        margin-top: 16px;
        margin-bottom: 8px;
    }
    .title-image {
        max-width: 72px;
        max-height: 72px;
        margin-bottom: 8px;
    }
    .welcome {
        font-size: 1rem;
        margin-bottom: 4px;
    }
    .theme-switch {
        top: 8px;
        right: 8px;
        gap: 4px;
    }
    .toggle-extra, .eye-care {
        padding: 6px 10px;
        font-size: 0.9rem;
    }
    #eyeCare.eye-care {
        left: 20px;
        width: 16px;
        height: 16px;
        min-width: 10px;
        min-height: 10px;
        max-width: 16px;
        max-height: 16px;
    }
}

.toggle-extra {
    display: block;
    margin: 0 auto 16px auto;
    padding: 8px 24px;
    font-size: 1rem;
    border: none;
    border-radius: 8px;
    background: #4F8EF7;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
}
.toggle-extra:hover {
    background: #1976D2;
}

#eyeCare.eye-care {
    position: fixed;
    left: 20px;
    top: 20px;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    max-width: 32px;
    max-height: 32px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: #8bc34a;
    color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    box-sizing: border-box;
    transition: background 0.2s, border 0.2s;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.03);
    cursor: pointer;
}
#eyeCare.eye-care:focus {
    outline: none;
    border: 2px solid #fff;
} 