/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #7c3aed;
    --primary-light: #a78bfa;
    --primary-dark: #6d28d9;
    --secondary: #f472b6;
    --accent: #38bdf8;
    --success: #34d399;
    --warning: #fbbf24;
    --error-color: #ef4444;
    --bg: #f8fafc;
    --bg-card: #ffffff;
    --bg-light: #f1f5f9;
    --bg-hover: #e2e8f0;
    --text: #1e293b;
    --text-light: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --border-color: #cbd5e1;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);
    --radius: 20px;
    --radius-sm: 12px;
    --radius-xs: 8px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Waterfall Background */
.waterfall-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.waterfall-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(124, 58, 237, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(244, 114, 182, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(56, 189, 248, 0.05) 0%, transparent 60%);
}

.waterfall-item {
    position: absolute;
    border-radius: 50%;
    opacity: 0.12;
    filter: blur(50px);
    animation: float 25s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0) rotate(0deg); }
    25% { transform: translateY(-40px) translateX(20px) rotate(3deg); }
    50% { transform: translateY(-20px) translateX(-15px) rotate(-2deg); }
    75% { transform: translateY(-50px) translateX(10px) rotate(4deg); }
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.02);
}

.logo i {
    font-size: 1.8rem;
    color: var(--primary);
}

.logo-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Nav Menu */
.nav-menu {
    display: flex;
    gap: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-xs);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.25s ease;
}

.nav-link:hover {
    color: var(--text);
    background: rgba(124, 58, 237, 0.06);
}

.nav-link.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.nav-link i {
    font-size: 1rem;
}

/* Login Button */
.btn-login {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border: 2px solid var(--primary);
    background: transparent;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-login:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.25);
}

.menu-toggle {
    display: none;
    padding: 10px;
    border: none;
    background: transparent;
    font-size: 1.4rem;
    color: var(--text);
    cursor: pointer;
}

/* Mobile Nav */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid var(--border);
    padding: 12px 16px;
    z-index: 100;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

.mobile-nav .nav-link {
    flex: 1;
    flex-direction: column;
    padding: 8px;
    font-size: 0.7rem;
    text-align: center;
}

.mobile-nav .nav-link i {
    font-size: 1.2rem;
    margin-bottom: 2px;
}

.mobile-nav .nav-link span {
    display: block;
}

.mobile-nav .btn-login {
    flex: 1;
    justify-content: center;
    padding: 8px;
}

/* Main Content */
.main-content {
    padding-top: 72px;
    min-height: calc(100vh - 72px);
    position: relative;
    z-index: 1;
}

/* Page */
.page {
    max-width: 1280px;
    margin: 0 auto;
    padding: 60px 32px 100px;
}

/* Hero Section */
.hero-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 40px;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 80px;
    align-items: center;
}

.hero-text {
    max-width: 600px;
}

.hero-title {
    font-size: 3.2rem;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 20px;
    color: var(--text);
}

.title-accent {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 32px;
}

/* Input Card */
.input-card {
    background: white;
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.story-input {
    width: 100%;
    padding: 20px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    resize: none;
    transition: all 0.3s ease;
    background: var(--bg);
}

.story-input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
}

.input-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
}

.char-count {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.btn-generate {
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.btn-generate:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.35);
}

/* Hero Visual */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.floating-book {
    position: relative;
    animation: floatBook 6s ease-in-out infinite;
}

@keyframes floatBook {
    0%, 100% { transform: translateY(0) rotate(-5deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

.book-3d {
    width: 280px;
    height: 360px;
    position: relative;
    transform-style: preserve-3d;
    transform: rotateY(-15deg) rotateX(10deg);
}

.book-cover {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #7c3aed, #a78bfa);
    border-radius: 8px 20px 20px 8px;
    box-shadow: 
        -20px 20px 40px rgba(0, 0, 0, 0.3),
        inset -4px 0 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.book-cover::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 20px;
    background: linear-gradient(90deg, rgba(0,0,0,0.15), transparent);
}

.book-spine {
    position: absolute;
    left: -15px;
    top: 0;
    bottom: 0;
    width: 30px;
    background: linear-gradient(90deg, #5b21b6, #7c3aed);
    border-radius: 4px 0 0 4px;
    transform: rotateY(90deg);
    transform-origin: right;
}

.book-front {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.book-emoji {
    font-size: 6rem;
    margin-bottom: 20px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.book-title {
    font-family: 'Dancing Script', cursive;
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
    text-align: center;
}

/* Features Section */
.features-section {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.feature-card {
    background: white;
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: white;
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text);
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
}

/* Page Header */
.page-header {
    text-align: center;
    padding: 60px 32px 40px;
    max-width: 700px;
    margin: 0 auto;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}

.title-icon {
    display: inline-block;
    margin-right: 10px;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.page-subtitle {
    font-size: 1.15rem;
    color: var(--text-light);
}

/* Filter Bar */
.filter-bar {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 0 32px 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 12px 24px;
    border: 2px solid var(--border);
    background: white;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.25);
}

/* Waterfall Grid */
.waterfall-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    padding: 0 32px 60px;
    max-width: 1400px;
    margin: 0 auto;
}

.waterfall-item-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid var(--border);
    position: relative;
}

.waterfall-item-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.item-cover {
    width: 100%;
    aspect-ratio: 3/4;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    position: relative;
    overflow: hidden;
}

.item-cover .cover-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-cover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(0,0,0,0.1), transparent);
    pointer-events: none;
}

.cover-generating {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.65);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 2;
    backdrop-filter: blur(4px);
}

.cover-generating i {
    font-size: 0.75rem;
}

.item-info {
    padding: 16px;
}

.item-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
    line-height: 1.3;
}

.item-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.item-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.item-meta-extra {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    margin-top: 8px;
    align-items: center;
    overflow: hidden;
}

.item-meta-extra span {
    font-size: 0.7rem;
    color: var(--text-muted);
    background: var(--bg-secondary);
    padding: 2px 6px;
    border-radius: 8px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.meta-time {
    margin-left: auto;
    font-style: italic;
    opacity: 0.7;
}

/* Login Wall */
.login-wall {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
    padding: 60px 32px;
}

.login-prompt {
    text-align: center;
    background: white;
    padding: 56px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-width: 440px;
    width: 100%;
    border: 1px solid var(--border);
}

.login-illustration {
    margin-bottom: 28px;
}

.floating-books {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.book-float {
    font-size: 2.5rem;
    animation: floatBookItem 3s ease-in-out infinite;
}

.book-1 { animation-delay: 0s; }
.book-2 { animation-delay: 0.5s; }
.book-3 { animation-delay: 1s; }

@keyframes floatBookItem {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.login-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text);
}

.login-desc {
    color: var(--text-light);
    margin-bottom: 28px;
    font-size: 1rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.login-input {
    padding: 14px 18px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: var(--bg);
}

.login-input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
}

.btn-login-full {
    padding: 14px;
    background: var(--primary);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    margin-top: 8px;
    width: auto;
    min-width: 200px;
}

.btn-login-full:hover {
    background: #6d28d9;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.3);
}

.login-note {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.login-note a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.login-note a:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    background: white;
    border-top: 1px solid var(--border);
    padding: 40px 32px 24px;
    margin-top: auto;
}

.footer-content {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-brand .logo {
    font-size: 1.4rem;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-left: 0;
}

.footer-links {
    display: flex;
    gap: 28px;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    max-width: 1280px;
    margin: 32px auto 0;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Story Detail Page */
.story-detail-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 32px 80px;
}

.back-nav {
    margin-bottom: 32px;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: white;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-back:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateX(-4px);
}

.story-detail-container {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

/* 错误页面样式 */
.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 40px;
    text-align: center;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.error-icon {
    font-size: 6rem;
    margin-bottom: 20px;
    animation: floatEmoji 3s ease-in-out infinite;
}

.error-title {
    font-size: 2rem;
    color: #333;
    margin-bottom: 10px;
}

.error-message {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.btn-back-home {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 500;
    transition: all 0.3s;
}

.btn-back-home:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.story-cover-section {
    width: 100%;
    aspect-ratio: 3/2;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.story-emoji-large {
    font-size: 10rem;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.2));
    animation: floatEmoji 4s ease-in-out infinite;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-emoji-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: none;
    filter: none;
}

@keyframes floatEmoji {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-15px) rotate(3deg); }
    50% { transform: translateY(-5px) rotate(-2deg); }
    75% { transform: translateY(-12px) rotate(2deg); }
}

.story-info-section {
    padding: 40px;
}

.story-category-badge {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
    margin-bottom: 20px;
}

.story-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 32px;
    line-height: 1.2;
}

.story-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.meta-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.meta-card i {
    font-size: 1.5rem;
    color: var(--primary);
}

.meta-card span {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    text-align: center;
}

.story-description {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border);
}

.story-description h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
}

.story-description p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-light);
}

.story-content-section {
    margin-bottom: 40px;
}

.story-content-section h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 24px;
}

.story-text {
    color: var(--text-light);
    line-height: 1.8;
}

/* 故事页面样式 */
.story-page {
    margin-bottom: 40px;
    padding: 20px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

.story-page-image {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    border-radius: var(--radius-xs);
    margin-bottom: 20px;
    display: block;
}

.story-page-text {
    color: var(--text);
    font-size: 1.1rem;
    line-height: 1.8;
    text-align: justify;
}

.story-chapter {
    margin-bottom: 32px;
}

.story-chapter h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
}

.story-chapter p {
    margin-bottom: 16px;
    font-size: 1rem;
}

.story-moral {
    margin-top: 24px;
    padding: 20px;
    background: var(--primary);
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: var(--radius-sm);
    color: white;
    font-weight: 500;
    text-align: center;
}

.story-actions {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 16px;
}

.btn-read-full {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1.05rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-read-full:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.35);
}

.btn-add-collection,
.btn-share {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 24px;
    background: white;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-add-collection:hover,
.btn-share:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

/* Create Book Page */
.create-book-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 32px 80px;
}

.create-book-header {
    text-align: center;
    margin-bottom: 48px;
}

.create-book-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 32px;
    margin-bottom: 48px;
}

/* Settings Panel */
.settings-panel {
    background: white;
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.setting-section {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border);
}

.setting-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.section-title {
  
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 20px;
}

.section-title i {
    color: var(--primary);
}

.input-wrapper {
    position: relative;
}

.story-input-large {
    width: 100%;
    padding: 20px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1.05rem;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s ease;
    background: var(--bg);
    line-height: 1.6;
}

.story-input-large:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
}

.char-count {
    text-align: right;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 8px;
}

/* Template Grid */
.template-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.template-card {
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.template-card:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
}

.template-card.active {
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.2);
}

.template-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.template-card h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.template-card.active h4 {
    color: white;
}

.template-card p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.template-card.active p {
    color: rgba(255, 255, 255, 0.8);
}

/* Range Slider */
.range-wrapper {
    padding: 20px 0;
}

.range-wrapper label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
}

.scene-number {
    background: var(--primary);
    color: white;
    padding: 4px 16px;
    border-radius: 100px;
    font-size: 1.1rem;
    font-weight: 700;
}

.scene-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: var(--border);
    outline: none;
    -webkit-appearance: none;
}

.scene-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
    transition: all 0.2s ease;
}

.scene-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
}

.scene-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 12px;
    text-align: center;
}

/* Age Options */
.age-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.age-card {
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.age-card:hover {
    border-color: var(--primary-light);
}

.age-card.active {
    border-color: var(--primary);
    background: var(--primary);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.2);
}

.age-label {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.age-card.active .age-label {
    color: white;
}

.age-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.age-card.active .age-desc {
    color: rgba(255, 255, 255, 0.8);
}

/* Preview Panel */
.preview-panel {
    background: white;
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    position: sticky;
    top: 100px;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.preview-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text);
}

.btn-preview-refresh {
    width: 36px;
    height: 36px;
    border: 2px solid var(--border);
    background: var(--bg);
    border-radius: 50%;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-preview-refresh:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: rotate(180deg);
}

.preview-content {
    text-align: center;
}

.preview-book-cover {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius);
    padding: 40px 32px;
    margin-bottom: 24px;
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.2);
}

.preview-emoji {
    font-size: 5rem;
    margin-bottom: 16px;
    animation: floatEmoji 3s ease-in-out infinite;
}

.preview-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
}

.preview-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.preview-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    color: var(--text-light);
}

.preview-item i {
    color: var(--primary);
}

/* Generate Action */
.generate-action {
    text-align: center;
}

.btn-generate-large {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px 48px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1.15rem;
    font-weight: 700;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.3);
}

.btn-generate-large:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(124, 58, 237, 0.4);
}

.btn-generate-large:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.generate-hint {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 12px;
}

/* Generating Animation Overlay */
.generating-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.generating-content {
    background: white;
    border-radius: 32px;
    padding: 48px 56px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Magic Wand Animation */
.magic-wand-animation {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 32px;
}

.wand {
    position: relative;
    width: 100%;
    height: 100%;
    animation: wandWave 2s ease-in-out infinite;
}

@keyframes wandWave {
    0%, 100% {
        transform: rotate(-15deg);
    }
    50% {
        transform: rotate(15deg);
    }
}

.sparkle {
    position: absolute;
    font-size: 1.5rem;
    animation: sparkleFloat 1.5s ease-in-out infinite;
}

.sparkle-1 {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 0s;
}

.sparkle-2 {
    top: 20%;
    left: 20%;
    animation-delay: 0.2s;
}

.sparkle-3 {
    top: 20%;
    right: 20%;
    animation-delay: 0.4s;
}

.sparkle-4 {
    top: 50%;
    left: 10%;
    animation-delay: 0.6s;
}

.sparkle-5 {
    top: 50%;
    right: 10%;
    animation-delay: 0.8s;
}

.sparkle-6 {
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 1s;
}

@keyframes sparkleFloat {
    0%, 100% {
        opacity: 0.3;
        transform: translateY(0) scale(0.8);
    }
    50% {
        opacity: 1;
        transform: translateY(-10px) scale(1.2);
    }
}

.generating-text h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.generating-status {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 32px;
}

/* Progress Bar */
.generating-progress {
    margin-bottom: 32px;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: var(--border);
    border-radius: 100px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
    background-size: 200% 100%;
    animation: progressGradient 2s ease infinite;
    border-radius: 100px;
    width: 0%;
    transition: width 0.3s ease;
}

@keyframes progressGradient {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 200% 50%;
    }
}

.progress-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
}

/* Steps */
.generating-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg);
    border-radius: var(--radius-xs);
    transition: all 0.3s ease;
    opacity: 0.4;
}

.step-item i {
    font-size: 0.6rem;
    color: var(--border);
    transition: all 0.3s ease;
}

.step-item span {
    font-size: 0.9rem;
    color: var(--text-light);
}

.step-item.active {
    opacity: 1;
    background: linear-gradient(135deg, var(--primary)10, var(--secondary)10);
    border: 1px solid var(--primary-light);
}

.step-item.active i {
    color: var(--primary);
    font-size: 0.8rem;
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

.step-item.completed {
    opacity: 1;
    background: linear-gradient(135deg, var(--success)10, var(--success)20);
    border: 1px solid var(--success);
}

.step-item.completed i {
    color: var(--success);
    font-size: 0.8rem;
}

.step-item.completed i::before {
    content: '✓';
    font-size: 0.7rem;
}

/* Completion Animation */
.completion-animation {
    animation: completionPop 0.6s ease;
}

@keyframes completionPop {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.checkmark-wrapper {
    width: 100px;
    height: 100px;
    margin: 0 auto 24px;
}

.checkmark {
    width: 100%;
    height: 100%;
}

.checkmark-circle {
    stroke: var(--success);
    stroke-width: 4;
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    animation: circleFill 0.6s ease forwards;
}

@keyframes circleFill {
    to {
        stroke-dashoffset: 0;
    }
}

.checkmark-check {
    stroke: var(--success);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: checkDraw 0.4s ease 0.6s forwards;
}

@keyframes checkDraw {
    to {
        stroke-dashoffset: 0;
    }
}

.completion-animation h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.completion-animation p {
    font-size: 1.05rem;
    color: var(--text-light);
    margin-bottom: 32px;
}

.book-preview-complete {
    margin-bottom: 32px;
}

.mini-book {
    width: 80px;
    height: 100px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 8px 16px 16px 8px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.3);
    animation: bookFloat 2s ease-in-out infinite;
}

@keyframes bookFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(2deg);
    }
}

.mini-book-emoji {
    font-size: 3rem;
}

.btn-view-book {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1.05rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.3);
}

.btn-view-book:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.4);
}

/* Responsive for Create Book Page */

/* Responsive for Create Book Page */
@media (max-width: 1024px) {
    .create-book-container {
        grid-template-columns: 1fr;
    }

    .preview-panel {
        position: static;
    }

    .template-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .create-book-page {
        padding: 24px 16px 60px;
    }

    .settings-panel,
    .preview-panel {
        padding: 24px;
    }

    .template-grid {
        grid-template-columns: 1fr;
    }

    .age-options {
        grid-template-columns: repeat(2, 1fr);
    }

    .btn-generate-large {
        width: 100%;
        padding: 18px 32px;
    }

    .section-title {
        font-size: 1.1rem;
    }
}

/* Story Detail Page Responsive */
@media (max-width: 768px) {
    .story-detail-page {
        padding: 24px 16px 60px;
    }

    .story-info-section {
        padding: 24px;
    }

    .story-title {
        font-size: 1.8rem;
    }

    .story-emoji-large {
        font-size: 6rem;
    }

    .story-meta-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .story-meta-card {
        padding: 16px;
    }

    .story-actions {
        grid-template-columns: 1fr;
    }
}

/* Responsive */
@media (max-width: 1200px) {
    .features-section {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .waterfall-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1200px;
    }
}

@media (max-width: 1024px) {
    .hero-section {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
        margin: 0 auto;
    }
    
    .hero-text {
        max-width: 100%;
    }
    
    .hero-visual {
        order: -1;
    }
    
    .input-footer {
        flex-direction: column;
        gap: 16px;
    }
    
    .btn-generate {
        width: 100%;
        justify-content: center;
    }
    
    .book-3d {
        width: 200px;
        height: 260px;
    }
    
    .book-emoji {
        font-size: 4rem;
    }
    
    .book-title {
        font-size: 1.4rem;
    }
    
    .waterfall-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 0 16px;
    }
    
    .nav-menu {
        display: none;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .mobile-nav {
        display: flex;
    }
    
    .waterfall-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 0 16px 40px;
    }
    
    .main-content {
        padding-bottom: 140px;
    }
    
    .page {
        padding: 40px 16px 60px;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .features-section {
        grid-template-columns: 1fr;
    }
    
    .waterfall-grid {
        grid-template-columns: 1fr;
        padding: 0 16px 40px;
    }
    
    .filter-bar {
        padding: 0 16px 24px;
    }
    
    .page-header {
        padding: 40px 16px 24px;
    }
    
    .page-title {
        font-size: 1.8rem;
    }
    
    .login-prompt {
        padding: 32px 24px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .waterfall-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-btn {
        padding: 10px 18px;
        font-size: 0.85rem;
    }
    
    .btn-login span {
        display: none;
    }
    
    .btn-login {
        padding: 10px 14px;
    }
}

/* Section Header */
.section-header {
    text-align: center;
    padding: 60px 32px 40px;
    max-width: 700px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
}

/* Popular Stories Section */
.popular-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px 80px;
}

.popular-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.story-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    cursor: pointer;
}

.story-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.story-cover {
    aspect-ratio: 3/4;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.story-info {
    padding: 14px;
}

.story-info h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.story-meta {
    display: flex;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.story-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.section-action {
    text-align: center;
}

.btn-view-all {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: white;
    border: 2px solid var(--primary);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-view-all:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* How It Works Section */
.how-it-works {
    background: white;
    padding: 60px 32px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.how-it-works .section-header {
    text-align: center;
    padding: 0 32px 40px;
    max-width: 700px;
    margin: 0 auto;
}

.steps-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 20px;
}

.step-card {
    flex: 1;
    text-align: center;
    padding: 32px 24px;
    background: var(--bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    position: relative;
}

.step-number {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
}

.step-icon {
    width: 64px;
    height: 64px;
    margin: 16px auto 20px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.step-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text);
}

.step-card p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
}

.step-connector {
    display: flex;
    align-items: center;
    padding-top: 60px;
    color: var(--primary);
    font-size: 1.2rem;
}

/* Testimonials Section */
.testimonials-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 60px 32px;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.testimonial-card {
    background: white;
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    text-align: center;
}

.testimonial-avatar {
    font-size: 3rem;
    margin-bottom: 16px;
}

.testimonial-text {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 20px;
    font-style: italic;
}

.testimonial-author h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.testimonial-author span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Stats Section */
.stats-section {
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    padding: 48px 32px;
}

.stats-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 32px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

/* FAQ Section */
.faq-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 32px 80px;
}

.faq-container {
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
}

.faq-item {
    border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: var(--bg);
}

.faq-question i {
    color: var(--text-light);
    transition: transform 0.3s ease;
}

.faq-answer {
    padding: 0 24px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-answer p {
    padding-bottom: 20px;
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.6;
}

.faq-item.active .faq-answer {
    max-height: 200px;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

/* CTA Section */
.cta-section {
    background: white;
    padding: 80px 32px;
    border-top: 1px solid var(--border);
}

.cta-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.cta-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}

.cta-content p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 28px;
}

.cta-input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.cta-input {
    flex: 1;
    padding: 16px 20px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: var(--bg);
}

.cta-input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
}

.cta-note {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Responsive for new sections */
@media (max-width: 1200px) {
    .popular-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .popular-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .steps-container {
        flex-direction: column;
        align-items: center;
    }
    
    .step-connector {
        transform: rotate(90deg);
        padding: 10px 0;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-input-group {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .popular-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .popular-section {
        padding: 0 16px 60px;
    }
    
    .section-header {
        padding: 40px 16px 24px;
    }
    
    .how-it-works {
        padding: 40px 16px;
    }
    
    .testimonials-section {
        padding: 40px 16px;
    }
    
    .stats-container {
        gap: 24px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .faq-section {
        padding: 40px 16px 60px;
    }
    
    .cta-section {
        padding: 60px 16px;
    }
}

/* Pricing Page */
.pricing-hero {
    text-align: center;
    padding: 80px 32px 40px;
    max-width: 700px;
    margin: 0 auto;
}

.pricing-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 60px;
}

.toggle-label {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-light);
}

.save-badge {
    background: var(--success);
    color: white;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 100px;
    margin-left: 8px;
}

.toggle-switch {
    position: relative;
    width: 56px;
    height: 30px;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--border);
    border-radius: 30px;
    transition: 0.3s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    left: 4px;
    bottom: 4px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--primary);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(26px);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 32px 80px;
}

.pricing-card {
    background: white;
    border-radius: var(--radius);
    padding: 40px 32px;
    border: 2px solid var(--border);
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
}

.pricing-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.pricing-card.popular {
    border-color: var(--primary);
    transform: scale(1.05);
}

.pricing-card.popular:hover {
    transform: scale(1.05) translateY(-8px);
}

.popular-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: 100px;
    white-space: nowrap;
}

.plan-header {
    margin-bottom: 32px;
}

.plan-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
}

.plan-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    margin-bottom: 8px;
}

.currency {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-light);
}

.amount {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
}

.period {
    font-size: 1rem;
    color: var(--text-light);
    margin-left: 4px;
}

.plan-desc {
    font-size: 0.95rem;
    color: var(--text-light);
}

.plan-features {
    list-style: none;
    text-align: left;
    margin-bottom: 32px;
}

.plan-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    font-size: 0.95rem;
    color: var(--text);
    border-bottom: 1px solid var(--border);
}

.plan-features li:last-child {
    border-bottom: none;
}

.plan-features li i {
    font-size: 0.9rem;
}

.plan-features li i.fa-check {
    color: var(--success);
}

.plan-features li.disabled {
    color: var(--text-muted);
}

.plan-features li.disabled i {
    color: var(--text-muted);
}

.btn-plan {
    width: 100%;
    padding: 16px;
    border: 2px solid var(--primary);
    background: transparent;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-plan:hover {
    background: var(--primary);
    color: white;
}

.btn-plan.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-plan.btn-primary:hover {
    background: #6d28d9;
}

/* Login Modal */
.login-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.login-modal-content {
    background: white;
    border-radius: var(--radius);
    padding: 48px 40px;
    max-width: 420px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    position: relative;
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s ease;
}

.login-modal-content.show {
    transform: scale(1);
    opacity: 1;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg);
    border-radius: 50%;
    font-size: 1.4rem;
    color: var(--text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

/* Template Select Dropdown */
.template-select-wrapper {
    position: relative;
}

.template-select {
    width: 100%;
    padding: 16px 20px;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text);
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    appearance: none;
    transition: all 0.3s ease;
}

.template-select:hover {
    border-color: var(--primary-light);
}

.template-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.template-select-wrapper::after {
    content: '▼';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.8rem;
    pointer-events: none;
}

/* New Generating Animation Styles */
.generating-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.generating-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 32px;
    padding: 48px 56px;
    max-width: 520px;
    width: 90%;
    text-align: center;
    position: relative;
    animation: slideUp 0.4s ease;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
}

@keyframes slideUp {
    from {
        transform: translateY(40px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.magic-wand-container {
    position: relative;
    margin-bottom: 32px;
}

.magic-wand {
    position: relative;
    display: inline-block;
    animation: wandWave 1.5s ease-in-out infinite;
}

@keyframes wandWave {
    0%, 100% { transform: rotate(-8deg); }
    50% { transform: rotate(8deg); }
}

.wand-emoji {
    font-size: 4rem;
    display: block;
}

.wand-sparkles {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.sparkle {
    position: absolute;
    font-size: 1.5rem;
    animation: sparkleFloat 2s ease-in-out infinite;
}

.sparkle-1 {
    top: 10%;
    left: 20%;
    animation-delay: 0s;
}

.sparkle-2 {
    top: 20%;
    right: 15%;
    animation-delay: 0.3s;
}

.sparkle-3 {
    bottom: 25%;
    left: 10%;
    animation-delay: 0.6s;
}

.sparkle-4 {
    bottom: 15%;
    right: 25%;
    animation-delay: 0.9s;
}

@keyframes sparkleFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-20px) scale(1.2);
        opacity: 1;
    }
}

.generating-title {
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 36px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.generating-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.generating-step {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    transition: all 0.3s ease;
    opacity: 0.5;
}

.generating-step.active {
    background: rgba(255, 255, 255, 0.2);
    opacity: 1;
    transform: scale(1.02);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.step-icon {
    font-size: 1.8rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
}

.step-text {
    flex: 1;
    color: white;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: left;
}

.step-progress {
    flex: 0 0 80px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: white;
    border-radius: 2px;
    width: 0;
    transition: width 1.5s ease-in-out;
}

.step-progress.animating .progress-bar {
    animation: progressFill 1.5s ease-in-out forwards;
}

@keyframes progressFill {
    from { width: 0; }
    to { width: 100%; }
}

.floating-emojis {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

.float-emoji {
    position: absolute;
    font-size: 2rem;
    animation: floatEmoji 4s ease-in-out infinite;
}

.emoji-1 {
    top: 20%;
    left: 5%;
    animation-delay: 0s;
}

.emoji-2 {
    top: 60%;
    right: 8%;
    animation-delay: 1s;
}

.emoji-3 {
    bottom: 15%;
    left: 10%;
    animation-delay: 2s;
}

.emoji-4 {
    top: 40%;
    right: 12%;
    animation-delay: 0.5s;
}

.emoji-5 {
    bottom: 25%;
    right: 5%;
    animation-delay: 1.5s;
}

@keyframes floatEmoji {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.3;
    }
    50% {
        transform: translateY(-30px) rotate(10deg);
        opacity: 0.7;
    }
}

/* Complete Animation */
.complete-animation {
    animation: completePop 0.5s ease;
}

@keyframes completePop {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-checkmark {
    width: 100px;
    height: 100px;
    margin: 0 auto 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: checkmarkRotate 0.6s ease;
}

@keyframes checkmarkRotate {
    0% {
        transform: rotate(-90deg) scale(0);
    }
    100% {
        transform: rotate(0) scale(1);
    }
}

.checkmark-circle {
    stroke: #4ade80;
    stroke-width: 3;
    animation: checkmarkCircle 0.6s ease-in-out forwards;
    stroke-dasharray: 157;
    stroke-dashoffset: 157;
}

@keyframes checkmarkCircle {
    0% { stroke-dashoffset: 157; }
    100% { stroke-dashoffset: 0; }
}

.checkmark-check {
    stroke: #4ade80;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    animation: checkmarkDraw 0.5s ease-in-out 0.4s forwards;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
}

@keyframes checkmarkDraw {
    0% { stroke-dashoffset: 48; }
    100% { stroke-dashoffset: 0; }
}

.complete-title {
    color: white;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 16px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.complete-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    margin-bottom: 36px;
}

.complete-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-complete-primary,
.btn-complete-secondary {
    padding: 16px 32px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 16px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-complete-primary {
    background: white;
    color: #667eea;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.btn-complete-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.btn-complete-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-complete-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.modal-close:hover {
    background: var(--border);
    color: var(--text);
}

.login-illustration {
    margin-bottom: 24px;
}

.floating-books {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.book-float {
    font-size: 2.5rem;
    animation: floatBookItem 3s ease-in-out infinite;
}

.book-1 { animation-delay: 0s; }
.book-2 { animation-delay: 0.5s; }
.book-3 { animation-delay: 1s; }

@keyframes floatBookItem {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.loading-spinner {
    width: 80px;
    height: 80px;
    background: var(--bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 2.5rem;
    color: var(--primary);
}

.success-animation {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--success), #4ade80);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    animation: successPop 0.5s ease;
}

@keyframes successPop {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.success-check {
    font-size: 3rem;
    color: white;
    font-weight: 700;
}

.login-modal-content .login-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text);
    text-align: center;
}

.login-modal-content .login-desc {
    color: var(--text-light);
    margin-bottom: 28px;
    font-size: 1rem;
    text-align: center;
}

.login-modal-content .login-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
    text-align: center;
}

.btn-google-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px;
    background: white;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-google-login:hover {
    background: var(--bg);
    border-color: var(--text);
    transform: translateY(-2px);
}

.google-icon {
    flex-shrink: 0;
}

.btn-email-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px;
    background: var(--primary);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-email-login:hover {
    background: #6d28d9;
    transform: translateY(-2px);
}

.login-modal-content .login-note {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
}

.login-modal-content .login-note a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.login-modal-content .login-note a:hover {
    text-decoration: underline;
}

/* Login button logged in state */
.btn-login.logged-in {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-login.logged-in:hover {
    background: #6d28d9;
}

/* User Avatar */
.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-login .user-avatar {
    width: 24px;
    height: 24px;
}

/* Avatar URL section styles */
.avatar-url-section {
    margin-bottom: 20px;
    padding: 20px;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.avatar-label {
    display: block;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.avatar-preview-small {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-hover);
    border: 2px solid var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-top: 15px;
    margin-left: auto;
    margin-right: auto;
}

.avatar-preview-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-preview-small i {
    font-size: 2.5rem;
    color: var(--text-light);
}

.avatar-hint {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 10px;
    text-align: center;
    line-height: 1.4;
}

.avatar-hint a {
    color: var(--primary);
    text-decoration: none;
}

.avatar-hint a:hover {
    text-decoration: underline;
}

/* Avatar Upload Section */
.avatar-upload-section,
.avatar-upload-section-small {
    margin-bottom: 20px;
    padding: 20px;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.avatar-upload-wrapper,
.avatar-upload-wrapper-small {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.avatar-preview-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-hover);
    border: 3px solid var(--primary);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.2);
    transition: all 0.3s ease;
}

.avatar-preview-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-preview-large i {
    font-size: 3rem;
    color: var(--text-light);
}

.avatar-upload-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-upload-avatar,
.btn-remove-avatar {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-xs);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-upload-avatar {
    background: var(--primary);
    color: white;
}

.btn-upload-avatar:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.btn-upload-avatar:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-remove-avatar {
    background: var(--error-color);
    color: white;
}

.btn-remove-avatar:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.avatar-url-divider {
    width: 100%;
    text-align: center;
    color: var(--text-light);
    font-size: 0.85rem;
    margin: 5px 0;
    position: relative;
}

.avatar-url-divider::before,
.avatar-url-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(50% - 30px);
    height: 1px;
    background: var(--border-color);
}

.avatar-url-divider::before { left: 0; }
.avatar-url-divider::after { right: 0; }

/* Story Detail Modal */
.story-detail-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.story-detail-content {
    background: white;
    border-radius: var(--radius);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9) translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.story-detail-content.show {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.story-detail-header {
    width: 100%;
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.story-detail-emoji {
    font-size: 8rem;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.15));
    animation: floatEmoji 3s ease-in-out infinite;
}

@keyframes floatEmoji {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.story-detail-body {
    padding: 32px;
}

.story-category-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    margin-bottom: 16px;
}

.story-detail-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
    line-height: 1.3;
}

.story-detail-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.meta-item i {
    color: var(--primary);
}

.story-detail-desc {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-light);
    margin-bottom: 28px;
}

.story-detail-actions {
    display: flex;
    gap: 12px;
    flex-direction: column;
}

.btn-read-story {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1.05rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-read-story:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.35);
}

.btn-add-collection {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-add-collection:hover {
    background: white;
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

/* Favorite Button in Story Detail */
.btn-favorite {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-favorite:hover {
    border-color: #ef4444;
    color: #ef4444;
    transform: translateY(-2px);
}

.btn-favorite.favorited {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
}

.btn-favorite.favorited:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: white;
}

.btn-favorite:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Responsive for Story Detail */
@media (max-width: 768px) {
    .story-detail-content {
        max-height: 95vh;
        border-radius: var(--radius-sm);
    }

    .story-detail-body {
        padding: 24px;
    }

    .story-detail-title {
        font-size: 1.5rem;
    }

    .story-detail-emoji {
        font-size: 6rem;
    }

    .story-detail-actions {
        flex-direction: column;
    }
}

/* Pricing Responsive */
@media (max-width: 1024px) {
    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 450px;
    }

    .pricing-card.popular {
        transform: none;
    }

    .pricing-card.popular:hover {
        transform: translateY(-8px);
    }
}

/* Pricing Responsive */
@media (max-width: 1024px) {
    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 450px;
    }
    
    .pricing-card.popular {
        transform: none;
    }
    
    .pricing-card.popular:hover {
        transform: translateY(-8px);
    }
}

@media (max-width: 768px) {
    .pricing-hero {
        padding: 60px 16px 32px;
    }
    
    .pricing-toggle {
        flex-direction: column;
        gap: 12px;
    }
    
    .pricing-grid {
        padding: 0 16px 60px;
    }
    
    .pricing-card {
        padding: 32px 24px;
    }
    
    .amount {
        font-size: 2.8rem;
    }
}

/* MyBooks Page Styles */
.mybooks-content {
    display: none;
    padding: 40px 32px 80px;
    max-width: 1400px;
    margin: 0 auto;
}

.mybooks-content.show {
    display: block;
}

.mybooks-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: white;
    padding: 20px 32px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    min-width: 180px;
}

.stat-icon {
    font-size: 2.5rem;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: #5c5c5c;
    margin-top: 4px;
}

.mybooks-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.btn-create-new {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.25);
}

.btn-create-new:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.35);
}

.mybooks-actions .filter-bar {
    margin-bottom: 0;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 32px;
}

.empty-illustration {
    margin-bottom: 24px;
}

.empty-icon {
    font-size: 5rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-light);
    margin-bottom: 24px;
}

.btn-create-first {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1.05rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.25);
}

.btn-create-first:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.35);
}

/* Heart Button */
.btn-heart {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: white;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    z-index: 10;
    opacity: 0;
    transform: scale(0.8);
}

.waterfall-item-card:hover .btn-heart {
    opacity: 1;
    transform: scale(1);
}

.btn-heart:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-heart.liked {
    background: #ef4444;
    color: white;
    animation: heartPop 0.3s ease;
}

@keyframes heartPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Delete Button on Cards */
.btn-delete {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 0.85rem;
    cursor: pointer;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    backdrop-filter: blur(4px);
}

.waterfall-item-card:hover .btn-delete {
    opacity: 1;
    transform: scale(1);
}

.btn-delete:hover {
    background: #ef4444;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Delete Button in Story Detail */
.btn-delete-story {
    padding: 12px 24px;
    border: 2px solid #ef4444;
    background: transparent;
    color: #ef4444;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-delete-story:hover {
    background: #ef4444;
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
    transform: translateY(-2px);
}

.btn-delete-story:active {
    transform: translateY(0);
}

/* Reader Page Styles */
.reader-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 72px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    z-index: 100;
}

.reader-header-left,
.reader-header-right {
    flex: 1;
}

.reader-header-right {
    text-align: right;
}

.reader-header-center {
    text-align: center;
}

.btn-back-reader {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: transparent;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-back-reader:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.reader-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text);
}

.page-indicator {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
}

.reader-main {
    padding-top: 72px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.reader-container {
    width: 100%;
    max-width: 1000px;
    padding: 40px 32px;
}

.book-viewer {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    perspective: 1500px;
    margin-bottom: 32px;
}

.book-page {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    opacity: 0;
    transform: rotateY(0deg);
    transition: all 0.4s ease;
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

.book-page.active {
    opacity: 1;
    z-index: 10;
}

.book-page.flipped {
    opacity: 0;
    transform: rotateY(-180deg);
}

/* Flip animations */
.book-page.flip-out {
    animation: flipOut 0.3s ease forwards;
}

.book-page.flip-out-reverse {
    animation: flipOutReverse 0.3s ease forwards;
}

.book-page.flip-in {
    animation: flipIn 0.3s ease forwards;
}

.book-page.flip-in-reverse {
    animation: flipInReverse 0.3s ease forwards;
}

@keyframes flipOut {
    to {
        opacity: 0;
        transform: rotateY(-90deg);
    }
}

@keyframes flipOutReverse {
    to {
        opacity: 0;
        transform: rotateY(90deg);
    }
}

@keyframes flipIn {
    from {
        opacity: 0;
        transform: rotateY(90deg);
    }
    to {
        opacity: 1;
        transform: rotateY(0deg);
    }
}

@keyframes flipInReverse {
    from {
        opacity: 0;
        transform: rotateY(-90deg);
    }
    to {
        opacity: 1;
        transform: rotateY(0deg);
    }
}

.page-content {
    display: flex;
    width: 100%;
    height: 100%;
}

.page-illustration {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Enlightenment页面 图书不存在错误提示 */
.book-error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    padding: 40px;
    text-align: center;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    margin: 20px 0;
}

.book-error-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    animation: floatEmoji 3s ease-in-out infinite;
}

.book-error-title {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 10px;
}

.book-error-message {
    color: #666;
    font-size: 1rem;
    margin-bottom: 30px;
}

.btn-book-error-close {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-book-error-close:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.illustration-emoji {
    font-size: 8rem;
    animation: floatEmoji 4s ease-in-out infinite;
}

.page-text {
    flex: 1;
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.page-number {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 24px;
}

.page-text p {
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--text);
}

.page-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.btn-nav {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: white;
    color: var(--text);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.btn-nav:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-nav:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-dots {
    display: flex;
    gap: 10px;
}

.page-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border);
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-dot:hover {
    background: var(--primary-light);
}

.page-dot.active {
    background: var(--primary);
    transform: scale(1.2);
}

.keyboard-hint {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.85rem;
    color: var(--text-muted);
    background: white;
    padding: 10px 20px;
    border-radius: 100px;
    box-shadow: var(--shadow);
}

.keyboard-hint kbd {
    display: inline-block;
    padding: 4px 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.8rem;
    margin: 0 2px;
}

/* Reader Responsive */
@media (max-width: 768px) {
    .reader-header {
        padding: 0 16px;
    }
    
    .reader-title {
        font-size: 1rem;
    }
    
    .reader-container {
        padding: 24px 16px;
    }
    
    .book-viewer {
        aspect-ratio: auto;
        min-height: 500px;
    }
    
    .page-content {
        flex-direction: column;
    }
    
    .page-illustration {
        height: 200px;
    }
    
    .illustration-emoji {
        font-size: 4rem;
    }
    
    .page-text {
        padding: 24px;
    }
    
    .page-text p {
        font-size: 1rem;
    }
    
    .keyboard-hint {
        display: none;
    }
}

/* Mouse Star Trail Effect */
.star-trail-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.mouse-star {
    position: absolute;
    width: 12px;
    height: 12px;
    background: radial-gradient(circle, #ffd700, #ffec8b);
    pointer-events: none;
    animation: starTwinkle 0.8s ease-out forwards;
    box-shadow: 0 0 10px 2px rgba(255, 215, 0, 0.6);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.mouse-star::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: inherit;
    border-radius: inherit;
    animation: starPulse 0.4s ease-out;
}

@keyframes starTwinkle {
    0% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.2) rotate(180deg);
    }
    100% {
        opacity: 0;
        transform: scale(0.3) rotate(360deg);
    }
}

@keyframes starPulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

/* Auth Form Container */
.auth-form-container {
    width: 100%;
}

.form-input {
    padding: 14px 18px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: var(--bg);
    width: 100%;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.btn-login-full:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* User Dropdown Menu */
.user-dropdown {
    position: fixed;
    background: white;
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border);
    min-width: 200px;
    padding: 8px;
    z-index: 1000;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.user-dropdown.show {
    opacity: 1;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-xs);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text);
}

.dropdown-item:hover {
    background: var(--bg);
    color: var(--primary);
}

.dropdown-item i {
    font-size: 1rem;
    color: var(--text-light);
    transition: color 0.2s ease;
}

.dropdown-item:hover i {
    color: var(--primary);
}

.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 6px 0;
}

.dropdown-item.logout-item {
    color: #ef4444;
}

.dropdown-item.logout-item:hover {
    background: #fee2e2;
    color: #dc2626;
}

.dropdown-item.logout-item i {
    color: #f87171;
}

.dropdown-item.logout-item:hover i {
    color: #dc2626;
}

/* 用户头像大图样式 */
.user-avatar-large {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    margin-right: 12px;
}

.user-avatar-large-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: var(--text-light);
}

.avatar-change-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.user-avatar-large:hover .avatar-change-overlay {
    opacity: 1;
}

.avatar-change-overlay i {
    font-size: 20px;
    margin-bottom: 5px;
}

.avatar-change-overlay span {
    font-size: 12px;
}

/* 用户信息头部 */
.dropdown-user-info {
    padding: 16px;
}

.user-info-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-info-text {
    flex: 1;
}

.user-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 4px;
}

.user-status {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* 下拉箭头 */
.dropdown-arrow {
    font-size: 0.8rem;
    margin-left: 4px;
    transition: transform 0.3s ease;
}

.btn-login.has-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

/* 头像上传模态框样式 */
.avatar-upload-illustration {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.avatar-upload-illustration i {
    font-size: 48px;
    color: white;
}

.avatar-preview-section {
    text-align: center;
    margin: 20px 0;
}

.avatar-preview-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--primary);
    margin: 0 auto 20px;
    overflow: hidden;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-preview-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-preview-large i {
    font-size: 60px;
    color: var(--text-light);
}

.file-input-wrapper-large {
    margin-bottom: 15px;
}

.file-input-btn-large {
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.file-input-btn-large:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.file-input-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 25px;
    border-radius: 10px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
}

.file-input-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.file-info-card {
    background: #f0f8ff;
    padding: 12px;
    border-radius: 8px;
    margin: 10px 0;
    font-size: 0.9rem;
    text-align: left;
    border-left: 4px solid var(--accent);
}

.upload-requirements {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 12px;
    margin: 15px 0;
    text-align: left;
}

.upload-requirements h4 {
    margin: 0 0 8px 0;
    color: #856404;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.upload-requirements ul {
    margin: 0;
    padding-left: 20px;
    font-size: 0.85rem;
    color: #856404;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-secondary {
    padding: 12px 24px;
    background: var(--bg-light);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    flex: 1;
}

.btn-secondary:hover {
    background: var(--bg-hover);
}

.btn-login-full {
    flex: 1;
}

/* 上传状态 */
.upload-status {
    padding: 10px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin: 10px 0;
    display: none;
}

.upload-status.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.upload-status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.upload-status.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    display: block;
}

/* 提示消息 */
.toast-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10000;
    animation: slideIn 0.3s ease;
    font-weight: 500;
}

.toast-success {
    background: var(--success);
    color: white;
}

.toast-error {
    background: var(--error-color);
    color: white;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
