:root {
    /* 默认主题 - 暗色主题（适合深色背景） */
    --text-primary: #2c3e50;
}

/* 亮色主题（适合亮色背景） */
.light-theme {
    --text-primary: #ffffff;
}

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

body {
    font-family: 'SF Pro Display', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: #333;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* 动态背景 */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.background-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.6;
    transition: all 0.8s ease-in-out;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: transparent;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

h1 {
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 30px;
    font-size: 2.8em;
    font-weight: 700;
}

.controls {
    text-align: center;
    margin-bottom: 30px;
}

.theme-toggle {
    background: transparent;
    color: var(--text-primary);
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 10px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.theme-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn {
    background: transparent;
    color: var(--text-primary);
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 10px;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn:active {
    transform: translateY(0);
}

.api-section {
    background: transparent;
    padding: 24px;
    border-radius: 16px;
    margin: 24px 0;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.section-title {
    color: var(--text-primary);
    font-size: 1.3em;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.api-url {
    background: transparent;
    color: var(--text-primary);
    margin: 12px 0;
    padding: 16px 20px;
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.api-description {
    background: transparent;
    color: var(--text-primary);
    margin: 12px 0 20px 0;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-style: italic;
    opacity: 0.8;
    border-left: 3px solid rgba(102, 126, 234, 0.6);
    background: rgba(255, 255, 255, 0.05);
}

.api-url:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.copy-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: #007bff;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.copy-btn:hover { 
    background: #0056b3; 
    transform: translateY(-50%) scale(1.05);
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.stat-card {
    background: transparent;
    color: var(--text-primary);
    padding: 24px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-card:hover {
    transform: translateY(-4px);
}

.stat-number { 
    font-size: 2.2em; 
    font-weight: 700; 
    margin-bottom: 8px;
}

.stat-label { 
    font-size: 0.9em; 
    opacity: 0.95; 
    font-weight: 500;
}

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    z-index: 1000;
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.toast.show {
    transform: translateX(0);
}

@media (max-width: 600px) {
    body { padding: 10px; }
    .container { 
        padding: 24px; 
        border-radius: 16px;
    }
    h1 { font-size: 2.2em; }
    .copy-btn { 
        position: static; 
        margin-top: 12px; 
        display: block;
        width: 100%;
    }
    .btn {
        display: block;
        margin: 8px 0;
        width: 100%;
    }
}