:root {
    /* 浅蓝色主题 */
    --primary-color: #4a90e2;
    --primary-dark: #357abd;
    --primary-light: #6ba5e8;
    --secondary-color: #f8f9fa;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    
    /* 文字颜色 */
    --text-primary: #2c3e50;
    --text-secondary: #6c757d;
    --text-light: #95a5a6;
    --text-white: #ffffff;
    
    /* 背景颜色 */
    --bg-white: #ffffff;
    --bg-light: #f8f9fa;
    --bg-gradient-start: #4a90e2;
    --bg-gradient-end: #6ba5e8;
    
    /* 边框颜色 */
    --border-color: #e1e8ed;
    --border-light: #edf2f7;
    
    /* 阴影 */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 5px 15px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.15);
    
    /* 圆角 */
    --radius-sm: 5px;
    --radius-md: 8px;
    --radius-lg: 20px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
    min-height: 100vh;
    color: var(--text-primary);
}

/* 导航栏样式 */
.navbar {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.navbar-brand:hover {
    color: var(--primary-dark);
}

.navbar-nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link.btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--text-white);
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.nav-link.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* 卡片样式 */
.card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
}

.card-header {
    border-bottom: 2px solid var(--border-light);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.card-header h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--text-white);
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    text-align: center;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--text-secondary);
}

.btn-secondary:hover {
    box-shadow: var(--shadow-md);
}

.btn-danger {
    background: var(--danger-color);
}

/* 表单样式 */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

input, textarea, select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
}

input:disabled {
    background: var(--bg-light);
    cursor: not-allowed;
}

/* 消息提示 */
.message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    display: none;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    display: block;
}

/* 徽章样式 */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
}

.badge.primary {
    background: var(--primary-light);
    color: var(--text-white);
}

.badge.success {
    background: var(--success-color);
    color: var(--text-white);
}

.badge.danger {
    background: var(--danger-color);
    color: var(--text-white);
}

.badge.warning {
    background: var(--warning-color);
    color: var(--text-primary);
}

/* 网格布局 */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* 列表样式 */
.list {
    list-style: none;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.list-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.list-item:last-child {
    border-bottom: none;
}

/* 代码块 */
.code-block {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin: 1.5rem 0;
    position: relative;
    overflow-x: auto;
}

.code-block pre {
    margin: 0;
    font-family: 'Fira Code', monospace;
    line-height: 1.6;
}

.code-block .comment {
    color: #95a5a6;
}

.copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #34495e;
    color: var(--text-white);
    border: none;
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.3s ease;
}

.copy-btn:hover {
    background: #3d566e;
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.loading::after {
    content: '';
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 0.5rem;
}

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

/* 响应式设计 */
@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }
    
    .navbar-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .container {
        padding: 1rem;
    }
}

/* 英雄区域 */
.hero {
    text-align: center;
    color: var(--text-white);
    padding: 4rem 0;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 0.8s ease 0.2s both;
}

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

/* 特性卡片 */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 步骤卡片 */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.step {
    text-align: center;
    padding: 2rem;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.step-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--text-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-weight: bold;
}

/* 表格样式 */
.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table th {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--text-white);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.table tr:last-child td {
    border-bottom: none;
}

.table tr:hover {
    background: var(--bg-light);
}

/* 密码强度指示器 */
.password-strength {
    margin-top: 0.5rem;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    width: 0;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.password-strength-bar.weak {
    background-color: var(--danger-color);
    width: 33.33%;
}

.password-strength-bar.medium {
    background-color: var(--warning-color);
    width: 66.66%;
}

.password-strength-bar.strong {
    background-color: var(--success-color);
    width: 100%;
}

.password-requirements {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    list-style: none;
}

.password-requirements li {
    margin-top: 0.2rem;
}

.password-requirements li.valid {
    color: var(--success-color);
}

.password-requirements li.invalid {
    color: var(--danger-color);
}