/* Enword 官方网站 - 主样式文件 */

/* ========== 变量定义 ========== */
:root {
    /* 主色调 */
    --primary: #4A90E2;
    --primary-dark: #3A7BC8;
    --primary-light: #6BA3E8;
    --primary-alpha-10: rgba(74, 144, 226, 0.1);
    --primary-alpha-20: rgba(74, 144, 226, 0.2);
    
    /* 辅助色 */
    --secondary: #50C878;
    --secondary-dark: #40A868;
    --secondary-alpha-10: rgba(80, 200, 120, 0.1);
    
    /* 强调色 */
    --accent: #FF6B6B;
    --accent-dark: #E85555;
    --accent-alpha-10: rgba(255, 107, 107, 0.1);
    
    /* 中性色 */
    --text-primary: #212121;
    --text-secondary: #757575;
    --text-hint: #9E9E9E;
    --divider: #E0E0E0;
    --background: #F5F7FA;
    --surface: #FFFFFF;
    
    /* 状态色 */
    --success: #52C41A;
    --warning: #FF9800;
    --error: #FF4D4F;
    --info: #1890FF;
    
    /* 阴影 */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 12px 48px rgba(0, 0, 0, 0.15);
    
    /* 圆角 */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    
    /* 过渡 */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* 字体 */
    --font-sans: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Poppins', var(--font-sans);
}

/* ========== 基础重置 ========== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    color: var(--text-primary);
    background-color: var(--background);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

ul, ol {
    list-style: none;
}

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

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* ========== 容器 ========== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========== 头部导航 ========== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.site-header.scrolled {
    box-shadow: var(--shadow-md);
}

.navbar {
    height: 72px;
    display: flex;
    align-items: center;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.logo-icon {
    font-size: 28px;
}

.logo-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 8px 0;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width var(--transition-normal);
}

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

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-name {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ========== 按钮 ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    cursor: pointer;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(74, 144, 226, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(80, 200, 120, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(80, 200, 120, 0.4);
}

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

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

.btn-accent {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-block {
    width: 100%;
}

/* ========== Hero 区域 ========== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #f8fafc 0%, #e8f4fc 50%, #f0f7ff 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 150%;
    background: radial-gradient(ellipse, var(--primary-alpha-20) 0%, transparent 70%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 60%;
    height: 100%;
    background: radial-gradient(ellipse, var(--secondary-alpha-10) 0%, transparent 70%);
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-text h1 {
    font-family: var(--font-display);
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.hero-text h1 span {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-text p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-visual {
    position: relative;
}

.hero-phone {
    width: 280px;
    height: 560px;
    margin: 0 auto;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 40px;
    padding: 12px;
    box-shadow: var(--shadow-xl);
    position: relative;
}

.hero-phone::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 28px;
    background: #1a1a1a;
    border-radius: 20px;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    border-radius: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    padding: 40px 20px;
}

.phone-screen .app-logo {
    font-size: 64px;
    margin-bottom: 16px;
}

.phone-screen h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.phone-screen p {
    font-size: 14px;
    opacity: 0.9;
}

/* ========== 功能卡片 ========== */
.features {
    padding: 100px 0;
    background: var(--surface);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.section-header p {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

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

.feature-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    text-align: center;
    transition: all var(--transition-normal);
    border: 1px solid var(--divider);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: var(--primary-alpha-10);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.feature-card p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ========== 屏幕截图展示 ========== */
.screenshots {
    padding: 100px 0;
    background: var(--background);
}

.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.screenshot-item {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

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

.screenshot-phone {
    width: 100%;
    max-width: 240px;
    margin: 0 auto 20px;
    background: #1a1a1a;
    border-radius: 28px;
    padding: 8px;
}

.screenshot-screen {
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 22px;
    height: 400px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.screenshot-header {
    background: var(--primary);
    color: white;
    padding: 16px;
    font-weight: 600;
}

.screenshot-content {
    flex: 1;
    padding: 20px;
}

.screenshot-content h4 {
    color: var(--text-primary);
    font-size: 16px;
    margin-bottom: 12px;
}

.screenshot-content p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

/* ========== 下载区域 ========== */
.download-section {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.download-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.download-section .container {
    position: relative;
    z-index: 1;
}

.download-section .section-header h2 {
    color: white;
}

.download-section .section-header p {
    color: rgba(255, 255, 255, 0.9);
}

.download-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.download-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    transition: all var(--transition-normal);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.download-card:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-4px);
}

.download-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.download-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.download-card .version {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 16px;
}

.download-card .btn {
    background: white;
    color: var(--primary);
    font-weight: 600;
}

.download-card .btn:hover {
    background: var(--primary-alpha-10);
}

/* ========== 词库区域 ========== */
.libraries-section {
    padding: 100px 0;
    background: var(--surface);
}

.libraries-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.library-card {
    background: var(--surface);
    border: 1px solid var(--divider);
    border-radius: var(--radius-lg);
    padding: 32px;
    display: flex;
    align-items: center;
    gap: 24px;
    transition: all var(--transition-normal);
}

.library-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.library-icon {
    width: 64px;
    height: 64px;
    background: var(--primary-alpha-10);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}

.library-info {
    flex: 1;
}

.library-info h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.library-info p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.library-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-hint);
}

.library-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.library-action {
    flex-shrink: 0;
}

/* ========== CTA 区域 ========== */
.cta-section {
    padding: 100px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e8f4fc 100%);
    text-align: center;
}

.cta-content h2 {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.cta-content p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
}

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

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 2px solid var(--divider);
    border-radius: var(--radius-md);
    background: var(--surface);
    transition: all var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-alpha-10);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-error {
    color: var(--error);
    font-size: 13px;
    margin-top: 6px;
}

/* ========== 页面标题 ========== */
.page-header {
    padding: 140px 0 60px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    text-align: center;
}

.page-header h1 {
    font-family: var(--font-display);
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 12px;
}

.page-header p {
    font-size: 18px;
    opacity: 0.9;
}

/* ========== 内容区块 ========== */
.content-section {
    padding: 80px 0;
}

.content-block {
    margin-bottom: 80px;
}

.content-block:last-child {
    margin-bottom: 0;
}

.content-block h2 {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.content-block p {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 16px;
}

/* ========== 页脚 ========== */
.site-footer {
    background: var(--text-primary);
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-section p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul a {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    transition: color var(--transition-fast);
}

.footer-section ul a:hover {
    color: var(--primary-light);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
}

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

.auth-container {
    width: 100%;
    max-width: 440px;
}

.auth-card {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    box-shadow: var(--shadow-lg);
}

.auth-header {
    text-align: center;
    margin-bottom: 40px;
}

.auth-header .logo {
    justify-content: center;
    margin-bottom: 16px;
}

.auth-header h1 {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.auth-header p {
    font-size: 15px;
    color: var(--text-secondary);
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--primary);
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    font-size: 14px;
}

.alert-success {
    background: rgba(82, 196, 26, 0.1);
    color: var(--success);
    border: 1px solid var(--success);
}

.alert-error {
    background: rgba(255, 77, 79, 0.1);
    color: var(--error);
    border: 1px solid var(--error);
}

/* ========== 关于页面 ========== */
.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-intro {
    text-align: center;
    margin-bottom: 60px;
}

.about-intro .big-logo {
    font-size: 80px;
    margin-bottom: 24px;
}

.about-intro h2 {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.about-intro p {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.contact-form {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-md);
}

.contact-form h3 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 24px;
}

/* ========== 动画 ========== */
.fade-in {
    animation: fadeIn 0.6s ease;
}

.slide-up {
    animation: slideUp 0.6s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* ========== 工具类 ========== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mt-5 { margin-top: 40px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mb-5 { margin-bottom: 40px; }

.hidden { display: none; }
.visible { display: block; }

/* ========== 移动菜单按钮 ========== */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all var(--transition-fast);
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ========== 词库页面额外样式 ========== */
.library-list {
    margin-top: 40px;
}

.library-item {
    background: var(--surface);
    border: 1px solid var(--divider);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all var(--transition-normal);
}

.library-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.library-icon-large {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-alpha-10) 0%, var(--secondary-alpha-10) 100%);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    flex-shrink: 0;
}

.library-details {
    flex: 1;
}

.library-details h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.library-details p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.library-stats {
    display: flex;
    gap: 24px;
    font-size: 13px;
    color: var(--text-hint);
}

.library-stats span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.library-actions {
    display: flex;
    gap: 12px;
}

/* ========== 模态框 ========== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: 40px;
    max-width: 480px;
    width: 90%;
    transform: translateY(20px);
    transition: transform var(--transition-normal);
}

.modal.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: var(--background);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--divider);
}

.update-key-display {
    background: var(--background);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    margin: 20px 0;
}

.update-key-display .key {
    font-family: 'Courier New', monospace;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.update-key-display .expire {
    font-size: 13px;
    color: var(--text-hint);
}

.copy-btn {
    background: var(--primary);
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

/* ========== 加载动画 ========== */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-alpha-20);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
