/* 涵光云方言AI开放平台 - 主样式文件 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', Arial, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    color: #fff;
}

/* 动态背景粒子效果 */
.bg-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    animation: float 15s infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 30px;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    color: #fff;
    text-decoration: none;
}

.nav-brand span {
    font-size: 28px;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s;
}

.nav-links a:hover {
    background: rgba(102, 126, 234, 0.3);
    color: #fff;
}

.nav-links a.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
}

/* 主内容区 */
.main-content {
    padding-top: 80px;
    min-height: 100vh;
}

/* Hero区域 */
.hero {
    padding: 100px 30px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    animation: fadeInUp 1s;
}

.hero h1 span {
    color: #667eea;
}

.hero p {
    font-size: 18px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 40px;
    animation: fadeInUp 1s 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    animation: fadeInUp 1s 0.4s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 30px;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: 2px solid rgba(255,255,255,0.3);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.5);
}

.btn-success {
    background: linear-gradient(135deg, #11998e, #38ef7d);
    color: #fff;
}

.btn-danger {
    background: linear-gradient(135deg, #ff416c, #ff4b2b);
    color: #fff;
}

/* 功能卡片 */
.features {
    padding: 60px 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.features h2 {
    text-align: center;
    font-size: 32px;
    margin-bottom: 50px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 30px;
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-10px);
    background: rgba(255,255,255,0.1);
    border-color: rgba(102, 126, 234, 0.5);
}

.feature-card .icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 15px;
}

.feature-card p {
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    line-height: 1.6;
}

/* API文档区域 */
.api-section {
    padding: 60px 30px;
    background: rgba(0,0,0,0.3);
}

.api-section h2 {
    text-align: center;
    font-size: 32px;
    margin-bottom: 40px;
}

.api-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.api-item {
    background: rgba(255,255,255,0.05);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(255,255,255,0.1);
}

.api-item h4 {
    color: #667eea;
    margin-bottom: 10px;
}

.api-item code {
    background: rgba(0,0,0,0.3);
    padding: 10px;
    border-radius: 8px;
    font-size: 12px;
    display: block;
    margin-top: 10px;
    color: #38ef7d;
}

/* 表单样式 */
.form-container {
    max-width: 500px;
    margin: 50px auto;
    background: rgba(255,255,255,0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.form-container h2 {
    color: #333;
    text-align: center;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: bold;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #667eea;
    outline: none;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

/* 消息提示 */
.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* 用户中心 */
.dashboard {
    padding: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.dashboard-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.tab-btn {
    padding: 10px 20px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.tab-content {
    background: rgba(255,255,255,0.95);
    border-radius: 20px;
    padding: 30px;
    color: #333;
}

/* API密钥卡片 */
.api-key-card {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
}

.api-key-card .key {
    font-family: monospace;
    background: #333;
    color: #38ef7d;
    padding: 10px;
    border-radius: 8px;
    margin: 10px 0;
}

.api-key-card .actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* 音频上传 */
.audio-upload-area {
    border: 2px dashed #667eea;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.audio-upload-area:hover {
    background: rgba(102, 126, 234, 0.1);
}

.audio-upload-area.dragover {
    background: rgba(102, 126, 234, 0.2);
    border-color: #764ba2;
}

/* 表格 */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px;
    border-bottom: 1px solid #e0e0e0;
    text-align: left;
}

.table th {
    background: #f8f9fa;
    font-weight: bold;
}

.table tr:hover {
    background: #f8f9fa;
}

/* 页脚 */
.footer {
    background: rgba(0,0,0,0.5);
    padding: 40px 30px;
    text-align: center;
    margin-top: 60px;
}

.footer-links {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 20px;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
}

.footer-links a:hover {
    color: #fff;
}

.footer p {
    color: rgba(255,255,255,0.5);
    font-size: 14px;
}

/* 响应式 */
@media (max-width: 768px) {
    .navbar {
        padding: 10px 15px;
    }
    
    .nav-links {
        display: none;
    }
    
    .hero h1 {
        font-size: 32px;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .form-container {
        padding: 20px;
    }
}