/* 考生网AI辅助平台 - 主样式 */

/* ========== 基础样式 ========== */
:root {
    --primary-color: #40B870;
    --primary-hover: #2d9d5a;
    --primary-light: #e8f8f0;
    --secondary-color: #1f2937;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    
    --bg-color: #f9fafb;
    --card-bg: #ffffff;
    --border-color: #e5e7eb;
    --text-color: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--bg-color);
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ========== 按钮样式 ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-outline {
    background: transparent;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-lg {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
}

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

/* ========== 导航栏 ========== */
.navbar {
    background: white;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo-img {
    height: 40px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.2s;
}

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

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ========== Hero区域 ========== */
.hero {
    padding: 5rem 0;
    background: linear-gradient(135deg, #e8f8f0 0%, #fff 50%, #e8f8f0 100%);
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.hero-desc {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-top: 3rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* ========== 功能特色 ========== */
.section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

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

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

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.feature-icon i {
    color: white;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.feature-desc {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.9375rem;
}

.feature-link {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.9375rem;
}

/* 颜色主题 */
.bg-red { background: var(--primary-color); }
.bg-orange { background: #f97316; }
.bg-blue { background: var(--info-color); }
.bg-purple { background: #8b5cf6; }
.bg-green { background: var(--success-color); }
.bg-pink { background: #ec4899; }

/* ========== 套餐价格 ========== */
.pricing {
    background: var(--bg-color);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    align-items: start;
}

.pricing-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    position: relative;
}

.pricing-card.featured {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--primary-color);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.pricing-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.pricing-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.pricing-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
}

.price-currency {
    font-size: 1.25rem;
    font-weight: 600;
}

.price-amount {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
}

.price-period {
    color: var(--text-secondary);
}

.price-original {
    color: var(--text-muted);
    text-decoration: line-through;
    margin-top: 0.5rem;
}

.pricing-features {
    list-style: none;
    margin-bottom: 2rem;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-features li i {
    color: var(--success-color);
}

.pricing-features li.disabled {
    color: var(--text-muted);
}

.pricing-features li.disabled i {
    color: var(--text-muted);
}

/* ========== 联系我们 ========== */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.contact-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.contact-card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.contact-card h4 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.contact-card p {
    color: var(--text-secondary);
}

/* ========== 页脚 ========== */
.footer {
    background: var(--secondary-color);
    color: white;
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo {
    height: 30px;
    filter: brightness(0) invert(1);
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.6);
    margin-top: 0.5rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.2s;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
}

/* ========== 认证页面 ========== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e8f8f0 0%, #fff 100%);
}

.auth-container {
    display: flex;
    max-width: 1000px;
    width: 100%;
    margin: 2rem;
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.auth-card {
    flex: 1;
    padding: 3rem;
}

.auth-card-lg {
    flex: 1.2;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo img {
    height: 40px;
    margin-bottom: 1.5rem;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: var(--text-secondary);
}

.auth-form {
    max-width: 400px;
    margin: 0 auto;
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.auth-bg {
    flex: 1;
    background: linear-gradient(135deg, var(--primary-color) 0%, #2d9d5a 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.auth-bg-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.auth-features {
    list-style: none;
    margin-top: 2rem;
}

.auth-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(64, 184, 112, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.form-link {
    color: var(--primary-color);
    font-size: 0.875rem;
}

.required {
    color: var(--danger-color);
}

/* ========== 仪表盘 ========== */
.dashboard-header {
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.dashboard-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-menu {
    position: relative;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-md);
}

.user-btn:hover {
    background: var(--bg-color);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.user-name {
    font-weight: 500;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    display: none;
}

.user-dropdown.show {
    display: block;
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-color);
}

.user-dropdown a:hover {
    background: var(--bg-color);
}

.dashboard-container {
    display: flex;
    min-height: calc(100vh - 70px);
}

.sidebar {
    width: 240px;
    background: white;
    border-right: 1px solid var(--border-color);
    padding: 1.5rem 0;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    color: var(--text-secondary);
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: var(--bg-color);
    color: var(--text-color);
}

.nav-item.active {
    background: #e8f8f0;
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    font-weight: 500;
}

.main-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.welcome-banner {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2d9d5a 100%);
    color: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.welcome-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-card .stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-card .stat-icon i {
    color: white;
    font-size: 1.25rem;
}

.stat-card .stat-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.stat-card .stat-info p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.feature-card-link {
    text-decoration: none;
}

.feature-card-link .feature-card {
    text-align: center;
}

.card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background: var(--bg-color);
    font-weight: 600;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-red { background: #fef2f2; color: var(--primary-color); }
.badge-orange { background: #fff7ed; color: #f97316; }
.badge-blue { background: #eff6ff; color: var(--info-color); }

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* ========== 响应式设计 ========== */
@media (max-width: 1024px) {
    .features-grid,
    .pricing-grid,
    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pricing-card.featured {
        transform: none;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem;
        border-top: 1px solid var(--border-color);
        box-shadow: var(--shadow-md);
    }
    
    .nav-menu.show {
        display: flex;
    }
    
    .nav-toggle {
        display: block;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 2rem;
    }
    
    .features-grid,
    .pricing-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .auth-bg {
        display: none;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: fixed;
        left: -240px;
        top: 70px;
        bottom: 0;
        z-index: 99;
        transition: left 0.3s;
    }
    
    .sidebar.show {
        left: 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ========== Toast提示 ========== */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    color: white;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    animation: slideIn 0.3s ease-out;
}

.toast.success {
    background: var(--success-color);
}

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

.toast.warning {
    background: var(--warning-color);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
