:root {
    --primary-color: #e0e5ec;
    --text-color: #2d4263;
    --shadow-light: #ffffff;
    --shadow-dark: rgba(163, 177, 198, 0.6);
    --accent-color: #4a90e2;
    --card-bg: #e0e5ec;
    --transition-speed: 0.3s;
}

[data-theme="dark"] {
    --primary-color: #2d3436;
    --text-color: #ecf0f1;
    --shadow-light: rgba(255, 255, 255, 0.1);
    --shadow-dark: rgba(0, 0, 0, 0.4);
    --accent-color: #74b9ff;
    --card-bg: #2d3436;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: all var(--transition-speed) ease;
}

body {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--primary-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Theme Switch Styles */
.theme-switch {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
}

.switch-label {
    width: 60px;
    height: 30px;
    background: var(--card-bg);
    border-radius: 15px;
    padding: 4px;
    display: flex;
    cursor: pointer;
    box-shadow: -3px -3px 7px var(--shadow-light),
                3px 3px 5px var(--shadow-dark);
}

.switch-label::after {
    content: '';
    width: 22px;
    height: 22px;
    background: var(--accent-color);
    border-radius: 50%;
    transition: var(--transition-speed);
}

#theme-toggle:checked + .switch-label::after {
    transform: translateX(30px);
}

#theme-toggle {
    display: none;
}

/* Header Styles */
header {
    background: var(--primary-color);
    padding: 20px;
    box-shadow: -8px -8px 20px var(--shadow-light),
                8px 8px 20px var(--shadow-dark);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    height: 50px;
    border-radius: 10px;
    padding: 5px;
    box-shadow: -5px -5px 10px var(--shadow-light),
                5px 5px 10px var(--shadow-dark);
}

h1 {
    color: var(--text-color);
    font-size: 1.8em;
    font-weight: 600;
}

/* Loader Styles */
.loader {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary-color);
    box-shadow: -8px -8px 15px var(--shadow-light),
                8px 8px 15px var(--shadow-dark),
                inset 3px 3px 5px var(--shadow-dark),
                inset -3px -3px 5px var(--shadow-light);
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader-inner {
    width: 60%;
    height: 60%;
    border-radius: 50%;
    border: 4px solid transparent;
    border-top-color: var(--accent-color);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Content Styles */
.content {
    flex: 1;
    padding: 40px 20px;
    margin-top: 20px;
}

.website-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 20px;
}

.website-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    cursor: pointer;
    box-shadow: -8px -8px 15px var(--shadow-light),
                8px 8px 15px var(--shadow-dark);
    transform: translateY(0);
    transition: all var(--transition-speed) ease;
}

.website-card:hover {
    transform: translateY(-10px);
    box-shadow: -12px -12px 20px var(--shadow-light),
                12px 12px 20px var(--shadow-dark);
}

.website-card img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 15px;
    padding: 10px;
    background: var(--card-bg);
    box-shadow: inset -5px -5px 10px var(--shadow-light),
                inset 5px 5px 10px var(--shadow-dark);
}

.card-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.card-content h3 {
    font-size: 1.2em;
    color: var(--text-color);
}

.card-content a {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.9em;
    word-break: break-all;
}

.card-content p {
    color: var(--text-color);
    font-size: 0.9em;
    opacity: 0.8;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.3);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
    /* 确保涟漪不影响布局 */
    width: 100px;
    height: 100px;
    opacity: 0;
}

/* Footer Styles */
footer {
    background: var(--primary-color);
    padding: 20px;
    text-align: center;
    box-shadow: 0 -8px 15px var(--shadow-dark);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

footer p {
    font-size: 0.8em;
    line-height: 1.6;
}

footer a {
    color: var(--accent-color);
    text-decoration: none;
}

footer img {
    height: 16px;
    vertical-align: middle;
    margin: 0 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        text-align: center;
    }

    h1 {
        font-size: 1.4em;
    }

    .website-container {
        grid-template-columns: 1fr;
    }

    .website-card {
        padding: 15px;
    }
}

/* Animations */
.hidden {
    display: none;
}
@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}