/* 通用样式 - Common Styles */

/* 重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* 容器样式 */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    margin-top: 80px;
}

/* 标题样式 */
h1 {
    text-align: center;
    color: #4a5568;
    margin-bottom: 30px;
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

/* 导航样式 */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 10px 0;
}

.nav-menu {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 0 20px;
    flex-wrap: wrap;
}

.nav-item {
    text-decoration: none;
    color: #4a5568;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
    background: rgba(116, 75, 162, 0.1);
    border: 1px solid rgba(116, 75, 162, 0.2);
}

.nav-item:hover {
    background: rgba(116, 75, 162, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.nav-item.active {
    background: #764ba2;
    color: white;
    box-shadow: 0 4px 8px rgba(118, 75, 162, 0.3);
}

/* 统一按钮容器样式 */
.btn-container {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    flex-wrap: wrap;
}

/* 按钮基础样式 */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 120px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 按钮变体 */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.btn-secondary {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #ee82f0 0%, #f34560 100%);
}

.btn-success {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #3d8bfe 0%, #00d9fe 100%);
}

.btn-warning {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: white;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #f85d92 0%, #fed32e 100%);
}

/* 加载状态 */
.loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 错误状态 */
.error {
    background: #e53e3e;
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    text-align: center;
    box-shadow: 0 4px 15px rgba(229, 62, 62, 0.2);
}

/* 成功状态 */
.success {
    background: #38a169;
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    text-align: center;
    box-shadow: 0 4px 15px rgba(56, 161, 105, 0.2);
}

/* 内容区域 */
.content {
    background: rgba(255, 255, 255, 0.8);
    padding: 25px;
    border-radius: 12px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(5px);
}

/* 输入框样式 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a5568;
}

.form-input, .form-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        margin-top: 120px;
        padding: 15px;
        border-radius: 10px;
    }
    
    .nav-menu {
        flex-direction: column;
        padding: 10px 15px;
        gap: 8px;
        max-height: 140px;
        overflow-y: auto;
        border-radius: 0 0 15px 15px;
    }
    
    .nav-item {
        width: 100%;
        text-align: center;
        min-height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .btn-container {
        flex-direction: column;
        gap: 12px;
    }
    
    .btn {
        width: 100%;
        min-width: auto;
    }
    
    h1 {
        font-size: 2rem;
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 12px;
    }
    
    .nav-menu {
        padding: 8px 12px;
        gap: 6px;
        max-height: 120px;
    }
    
    .nav-item {
        padding: 6px 12px;
        min-height: 36px;
        font-size: 14px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
}

@media (max-width: 360px) {
    .nav-menu {
        padding: 6px 10px;
        gap: 4px;
        max-height: 100px;
    }
    
    .nav-item {
        padding: 5px 10px;
        min-height: 32px;
        font-size: 13px;
    }
}