/* ========================================
   AI API 管理平台 - 前台样式
   ======================================== */

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
}

/* 基础样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #333;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    color: var(--secondary-color);
}

/* 导航栏 */
.navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.3rem;
}

/* Hero区域 */
.hero-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ed 100%);
}

.min-vh-75 {
    min-height: 75vh;
}

/* 代码预览框 */
.code-preview {
    background: #1e1e1e;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}

.code-header {
    background: #323232;
    padding: 12px 16px;
    display: flex;
    align-items: center;
}

.code-header .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

.code-header .dot.red { background: #ff5f56; }
.code-header .dot.yellow { background: #ffbd2e; }
.code-header .dot.green { background: #27c93f; }

.code-body {
    padding: 20px;
    margin: 0;
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.6;
}

.code-body code {
    color: #e0e0e0;
}

/* 特性卡片 */
.feature-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    height: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    margin-bottom: 20px;
}

/* 统计数字 */
.stat-item {
    padding: 20px;
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.card-header {
    background: white;
    border-bottom: 1px solid #f0f0f0;
    font-weight: 600;
}

/* 按钮样式 */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* 页脚 */
.footer {
    background: #1a1a2e !important;
}

.footer a {
    transition: color 0.3s;
}

.footer a:hover {
    color: white !important;
}

/* 表单样式 */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Alert样式 */
.alert {
    border: none;
    border-radius: 8px;
}

/* API密钥项 */
.api-key-item {
    transition: all 0.3s;
}

.api-key-item:hover {
    background: #f8f9fa;
}

/* Badge */
.badge {
    font-weight: 500;
}

/* 响应式 */
@media (max-width: 768px) {
    .hero-section {
        padding: 40px 0;
    }
    
    .code-preview {
        margin-top: 40px;
    }
    
    .display-4 {
        font-size: 2rem;
    }
}

/* 动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}
