/* ============================================
   MnemoCheat — Modern Dark Theme Styles
   ============================================ */

:root {
    /* Colors */
    --bg-primary: #0a0e17;
    --bg-secondary: #121a2d;
    --bg-tertiary: #1a2440;
    --bg-card: #1a2440;
    --bg-card-hover: #243052;
    
    --text-primary: #f0f4ff;
    --text-secondary: #8b9cc7;
    --text-muted: #5a6a8a;
    
    --accent-orange: #ff6b35;
    --accent-orange-glow: rgba(255, 107, 53, 0.3);
    --accent-blue: #4a9eff;
    --accent-cyan: #00d4ff;
    --accent-purple: #a855f7;
    --accent-green: #22c55e;
    
    --gradient-hero: linear-gradient(135deg, #ff6b35 0%, #f7931e 50%, #ffcc00 100%);
    --gradient-card: linear-gradient(145deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
    
    /* Typography */
    --font-main: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Spacing */
    --header-height: 70px;
    --container-max: 1200px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    
    /* Shadows */
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 8px 40px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 40px var(--accent-orange-glow);
}

/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(74, 158, 255, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(255, 107, 53, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(168, 85, 247, 0.04) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ============================================
   Header & Navigation
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(10, 14, 23, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 1000;
}

.nav {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.4rem;
}

.logo-icon {
    font-size: 1.6rem;
}

.logo-text {
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-link {
    font-weight: 600;
    color: var(--text-secondary);
    transition: color 0.2s;
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-orange);
    transition: width 0.3s;
}

.nav-link:hover::after {
    width: 100%;
}

/* ============================================
   Landing Page — Hero
   ============================================ */
.landing-main {
    padding-top: var(--header-height);
}

.hero {
    min-height: calc(100vh - var(--header-height));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    position: relative;
}

.hero-content {
    max-width: 600px;
    text-align: center;
    z-index: 1;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
}

.gradient-text {
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.hero-subtitle strong {
    color: var(--accent-orange);
}

/* CTA Button */
.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: var(--gradient-hero);
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: var(--radius-xl);
    transition: transform 0.2s, box-shadow 0.3s;
    box-shadow: var(--shadow-glow);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 60px var(--accent-orange-glow);
}

.cta-button.large {
    padding: 20px 44px;
    font-size: 1.2rem;
}

/* Floating Cards Decoration */
.hero-decoration {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

.floating-card {
    position: absolute;
    background: var(--gradient-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 16px 24px;
    box-shadow: var(--shadow-card);
    animation: float 6s ease-in-out infinite;
}

.floating-card .card-word {
    display: block;
    font-weight: 700;
    color: var(--accent-blue);
    font-size: 1.1rem;
}

.floating-card .card-translation {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.card-1 {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.card-2 {
    top: 30%;
    right: 12%;
    animation-delay: -2s;
}

.card-3 {
    bottom: 25%;
    left: 15%;
    animation-delay: -4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50% { transform: translateY(-20px) rotate(2deg); }
}

/* ============================================
   Features Section
   ============================================ */
.features {
    padding: 100px 24px;
    max-width: var(--container-max);
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 60px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--gradient-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Mnemonic Example */
.feature-example {
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.example-word {
    font-weight: 700;
    color: var(--accent-blue);
}

.example-arrow {
    color: var(--text-muted);
}

.example-mnemonic {
    color: var(--accent-orange);
    font-style: italic;
}

/* Interval Demo */
.interval-demo {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.interval {
    padding: 6px 12px;
    background: rgba(74, 158, 255, 0.15);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-blue);
}

.interval-arrow {
    color: var(--text-muted);
}

/* ============================================
   CTA Section
   ============================================ */
.cta-section {
    padding: 100px 24px;
    text-align: center;
}

.cta-content h2 {
    font-size: 2rem;
    margin-bottom: 12px;
}

.cta-content p {
    color: var(--text-secondary);
    margin-bottom: 32px;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    padding: 40px 24px;
    text-align: center;
    color: var(--text-muted);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ============================================
   Learn Page — Word List
   ============================================ */
.learn-page {
    min-height: 100vh;
    padding-top: var(--header-height);
}

.learn-main {
    max-width: 700px;
    margin: 0 auto;
    padding: 40px 24px;
}

.page-header {
    margin-bottom: 32px;
}

.page-title {
    font-size: 1.8rem;
    font-weight: 800;
}

.page-subtitle {
    color: var(--text-secondary);
    margin-top: 8px;
}

/* Word List */
.word-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

.word-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--gradient-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s;
}

.word-card:hover {
    background: var(--bg-card-hover);
    transform: translateX(4px);
    border-color: rgba(255, 107, 53, 0.3);
}

.word-image {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    object-fit: cover;
    background: var(--bg-secondary);
    flex-shrink: 0;
}

.word-info {
    flex: 1;
}

.word-english {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--accent-blue);
    margin-bottom: 2px;
}

.word-russian {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.word-arrow {
    color: var(--text-muted);
    transition: transform 0.2s;
}

.word-card:hover .word-arrow {
    transform: translateX(4px);
    color: var(--accent-orange);
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
}

.page-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    transition: all 0.2s;
}

.page-btn:hover:not(:disabled) {
    background: var(--accent-orange);
}

.page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.page-info {
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 120px;
    text-align: center;
}

.page-info span {
    color: var(--text-primary);
}

/* ============================================
   Word Detail Page
   ============================================ */
.detail-page {
    min-height: 100vh;
    padding-top: var(--header-height);
}

.detail-main {
    max-width: 700px;
    margin: 0 auto;
    padding: 40px 24px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 24px;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--accent-orange);
}

/* Word Detail Card */
.detail-card {
    background: var(--gradient-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.detail-image {
    width: 100%;
    height: 280px;
    object-fit: cover;
    background: var(--bg-secondary);
}

.detail-content {
    padding: 32px;
}

.detail-word {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--accent-blue);
    margin-bottom: 4px;
}

.detail-transcription {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.detail-translation {
    font-size: 1.4rem;
    color: var(--text-primary);
    margin-bottom: 24px;
}

/* Mnemonic Section */
.mnemonic-section {
    background: rgba(255, 107, 53, 0.1);
    border: 1px solid rgba(255, 107, 53, 0.2);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}

.mnemonic-label {
    font-weight: 700;
    color: var(--accent-orange);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mnemonic-text {
    font-size: 1.1rem;
    color: var(--text-primary);
    line-height: 1.7;
}

/* Example Sentences */
.examples-section h4 {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.example {
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
}

.example-en {
    color: var(--text-primary);
    margin-bottom: 6px;
}

.example-ru {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Audio Button */
.audio-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-weight: 600;
    transition: background 0.2s;
    margin-top: 16px;
}

.audio-btn:hover {
    background: var(--accent-blue);
}

/* Navigation between words */
.word-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 32px;
}

.word-nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 600;
    transition: all 0.2s;
}

.word-nav-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        text-align: center;
    }
    
    .floating-card {
        display: none;
    }
    
    .nav-links {
        gap: 20px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.word-card {
    animation: fadeInUp 0.4s ease-out backwards;
}

.word-card:nth-child(1) { animation-delay: 0.05s; }
.word-card:nth-child(2) { animation-delay: 0.1s; }
.word-card:nth-child(3) { animation-delay: 0.15s; }
.word-card:nth-child(4) { animation-delay: 0.2s; }
.word-card:nth-child(5) { animation-delay: 0.25s; }
.word-card:nth-child(6) { animation-delay: 0.3s; }
.word-card:nth-child(7) { animation-delay: 0.35s; }
.word-card:nth-child(8) { animation-delay: 0.4s; }
.word-card:nth-child(9) { animation-delay: 0.45s; }
.word-card:nth-child(10) { animation-delay: 0.5s; }

