/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 浅色模式 */
    --bg-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg-secondary: rgba(255, 255, 255, 0.1);
    --bg-card: rgba(255, 255, 255, 0.2);
    --text-primary: #333;
    --text-secondary: #666;
    --border-color: rgba(255, 255, 255, 0.3);
    --accent-color: #667eea;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    /* 深色模式 */
    --bg-primary: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    --bg-secondary: rgba(0, 0, 0, 0.2);
    --bg-card: rgba(0, 0, 0, 0.3);
    --text-primary: #fff;
    --text-secondary: #ccc;
    --border-color: rgba(255, 255, 255, 0.1);
    --accent-color: #3498db;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    transition: all 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 玻璃拟态效果 */
.glass {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-card);
    transform: translateY(-2px);
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

/* 卡片样式 */
.card {
    padding: 30px;
    margin-bottom: 20px;
}

/* 响应式布局 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .card {
        padding: 20px;
    }
}

/* 导航栏 */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    margin-bottom: 30px;
}

.navbar-brand {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.navbar-links {
    display: flex;
    gap: 20px;
}

.navbar-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.navbar-link:hover {
    color: var(--accent-color);
}

/* 主题切换按钮 */
.theme-toggle {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background: var(--bg-card);
    transform: rotate(180deg);
}

/* 消息样式 */
.message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 10px;
    animation: slideIn 0.3s ease;
}

.message-success {
    background: rgba(76, 175, 80, 0.2);
    border-left: 4px solid #4caf50;
    color: #4caf50;
}

.message-error {
    background: rgba(244, 67, 54, 0.2);
    border-left: 4px solid #f44336;
    color: #f44336;
}

/* 动画 */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--accent-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 响应式底部导航栏（移动端） */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    padding: 15px 0;
    z-index: 1000;
    display: none;
}

@media (max-width: 768px) {
    .bottom-nav {
        display: flex;
    }
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.bottom-nav-item.active {
    color: var(--accent-color);
}

.bottom-nav-icon {
    font-size: 20px;
    margin-bottom: 5px;
}

.bottom-nav-text {
    font-size: 12px;
}
