/* Mochi Landing — Matches App Design */

:root {
    --purple: #5B4CFF;
    --purple-dark: #4338CA;
    --purple-light: #EEF2FF;
    --orange: #FF8C42;
    --green: #10B981;
    --red: #DC2626;
    --bg: #FAFAFA;
    --card: #FFFFFF;
    --text: #1A1A1A;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;
    --border: #E5E7EB;
    --radius: 12px;
    --radius-lg: 16px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    height: 100vh;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}


/* Noise texture */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.035;
    pointer-events: none;
}

/* Hero */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    gap: 100px;
    position: relative;
    z-index: 1;
}

@media (max-width: 1000px) {
    .hero {
        flex-direction: column;
        gap: 48px;
        padding: 48px 24px;
    }
}

/* Content */
.hero-content {
    max-width: 440px;
}

.app-icon {
    width: 80px;
    height: 80px;
    border-radius: 18px;
    margin-bottom: 28px;
    box-shadow: 0 8px 32px rgba(91, 76, 255, 0.25);
}

.headline {
    font-size: 52px;
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.035em;
    margin-bottom: 20px;
}

@media (max-width: 600px) {
    .headline { font-size: 36px; }
}

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

.features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    margin-bottom: 36px;
}

.feature {
    font-size: 15px;
    color: var(--text-secondary);
    padding-left: 18px;
    position: relative;
}

.feature::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: var(--purple);
    border-radius: 50%;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--text);
    color: white;
    padding: 14px 28px;
    border-radius: 14px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.18);
}

.btn-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.btn-small { font-size: 11px; opacity: 0.85; }
.btn-large { font-size: 17px; font-weight: 600; }

/* Phone */
.phone-container {
    perspective: 1200px;
    position: relative;
}

/* Glow behind phone */
.phone-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 500px;
    background: radial-gradient(ellipse, rgba(91, 76, 255, 0.15) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.phone {
    width: 300px;
    height: 620px;
    background: linear-gradient(145deg, #2a2a2a 0%, #1a1a1a 100%);
    border-radius: 48px;
    padding: 12px;
    position: relative;
    box-shadow: 
        0 60px 120px rgba(91, 76, 255, 0.15),
        0 30px 60px rgba(0,0,0,0.12),
        inset 0 1px 1px rgba(255,255,255,0.1);
    animation: phoneFloat 5s ease-in-out infinite;
}

@keyframes phoneFloat {
    0%, 100% { transform: rotateY(-4deg) rotateX(2deg) translateY(0); }
    50% { transform: rotateY(2deg) rotateX(-1deg) translateY(-8px); }
}

.phone-notch {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 32px;
    background: #1a1a1a;
    border-radius: 20px;
    z-index: 10;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: var(--bg);
    border-radius: 40px;
    overflow: hidden;
    position: relative;
}

/* Screens */
.screen {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.screen.active {
    opacity: 1;
}

.screen-content {
    padding: 56px 16px 16px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Screen 1: Home */
.home-header {
    margin-bottom: 16px;
}

.home-jp {
    font-size: 12px;
    color: var(--text-muted);
}

.home-title {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.level-card {
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: 14px;
    margin-bottom: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

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

.level-label {
    font-size: 10px;
    color: var(--text-muted);
}

.level-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--purple);
}

.level-bars {
    display: flex;
    gap: 4px;
}

.level-bar {
    flex: 1;
    text-align: center;
}

.level-bar span {
    font-size: 9px;
    font-weight: 600;
    color: var(--text-muted);
}

.level-bar.active span {
    color: var(--purple);
}

.level-bar .bar {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin-top: 4px;
    overflow: hidden;
}

.level-bar .fill {
    height: 100%;
    background: var(--purple);
    border-radius: 2px;
}

.lesson-card {
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: 14px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    margin-bottom: 12px;
}

.card-badge {
    font-size: 9px;
    font-weight: 700;
    color: var(--purple);
    letter-spacing: 1px;
}

.card-unit {
    display: inline-block;
    font-size: 11px;
    color: var(--purple);
    background: var(--purple-light);
    padding: 4px 10px;
    border-radius: 20px;
    margin: 8px 0;
}

.card-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 4px;
}

.card-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.card-btn {
    width: 100%;
    padding: 12px;
    background: var(--purple);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.stats-row {
    display: flex;
    background: var(--card);
    border-radius: var(--radius);
    padding: 12px;
    margin-top: auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.stat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.stat-icon { font-size: 12px; }
.stat-num { font-size: 16px; font-weight: 700; }
.stat-label { font-size: 10px; color: var(--text-muted); }

/* Screen 2: Flashcard */
.fc-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
}

.fc-type {
    font-size: 10px;
    font-weight: 700;
    color: var(--purple);
    background: var(--purple-light);
    padding: 5px 10px;
    border-radius: 20px;
    letter-spacing: 0.5px;
}

.fc-streak {
    font-size: 11px;
    font-weight: 600;
    color: var(--orange);
    background: rgba(255,140,66,0.12);
    padding: 5px 10px;
    border-radius: 20px;
}

.flashcard {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--card);
    border-radius: 24px;
    margin-bottom: 12px;
    position: relative;
    box-shadow: 
        0 1px 0 rgba(91,76,255,0.08),
        0 4px 16px rgba(0,0,0,0.06);
}

.fc-glow {
    position: absolute;
    font-size: 120px;
    color: var(--purple);
    opacity: 0.06;
    filter: blur(20px);
}

.fc-char {
    font-size: 88px;
    font-weight: 400;
    color: var(--text);
    position: relative;
}

.fc-listen {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--purple-light);
    color: var(--purple);
    border: none;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
    cursor: pointer;
}

.listen-icon { font-size: 14px; }

.fc-answer {
    background: rgba(250,250,250,0.6);
    border-radius: 16px;
    padding: 12px;
    margin-bottom: 12px;
}

.fc-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
    margin-bottom: 12px;
}

.fc-info {
    display: flex;
    align-items: center;
}

.fc-col {
    flex: 1;
    text-align: center;
}

.fc-value {
    display: block;
    font-size: 22px;
    font-weight: 500;
    color: var(--purple);
    margin-bottom: 4px;
}

.fc-meaning {
    color: var(--text);
}

.fc-label {
    font-size: 9px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.fc-sep {
    width: 1px;
    height: 36px;
    background: var(--border);
}

.fc-buttons {
    display: flex;
    gap: 8px;
}

.fc-btn {
    flex: 1;
    padding: 12px 8px;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.fc-again { background: #FEE2E2; color: var(--red); }
.fc-good { background: var(--purple-light); color: var(--purple); }
.fc-easy { background: #D1FAE5; color: var(--green); }

/* Screen 3: Speaking */
.speak-header {
    text-align: center;
    margin-bottom: 24px;
}

.speak-progress {
    font-size: 12px;
    color: var(--text-muted);
}

.speak-instruction {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 24px;
}

.speak-prompt {
    text-align: center;
    margin-bottom: 32px;
}

.speak-jp {
    font-size: 36px;
    font-weight: 500;
    margin-bottom: 6px;
}

.speak-romaji {
    font-size: 14px;
    color: var(--purple);
    margin-bottom: 4px;
}

.speak-en {
    font-size: 16px;
    color: var(--text-secondary);
}

.mic-area {
    margin-top: auto;
    text-align: center;
    padding-bottom: 24px;
}

.mic-btn {
    width: 72px;
    height: 72px;
    background: var(--purple);
    border-radius: 50%;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    position: relative;
}

.mic-pulse {
    position: absolute;
    inset: -6px;
    border: 2px solid var(--purple);
    border-radius: 50%;
    animation: pulse 1.8s ease-out infinite;
}

.mic-pulse-2 {
    animation-delay: 0.6s;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.5; }
    100% { transform: scale(1.4); opacity: 0; }
}

.mic-hint {
    font-size: 13px;
    color: var(--text-muted);
}

/* Screen 4: Success */
.screen-success .screen-content {
    align-items: center;
    justify-content: center;
    text-align: center;
}

.success-check {
    width: 64px;
    height: 64px;
    background: var(--green);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popIn {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}

.success-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
}

.success-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 28px;
}

.success-stats {
    display: flex;
    gap: 24px;
    margin-bottom: 32px;
}

.success-stat { text-align: center; }
.ss-num { display: block; font-size: 24px; font-weight: 700; }
.ss-label { font-size: 11px; color: var(--text-muted); }

.success-btn {
    padding: 14px 56px;
    background: var(--purple);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

/* Footer */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    padding: 16px;
    color: var(--text-muted);
    font-size: 12px;
    z-index: 1;
}

/* Responsive */
@media (max-width: 1000px) {
    .hero-content { text-align: center; }
    .features { justify-content: center; }
    
    .phone {
        width: 260px;
        height: 540px;
        border-radius: 42px;
    }
    
    .phone-screen { border-radius: 34px; }
    .phone-notch { width: 90px; height: 28px; }
}

@media (max-width: 600px) {
    .hero { gap: 36px; padding: 32px 20px; }
    .headline { font-size: 32px; }
    .subheadline { font-size: 16px; margin-bottom: 24px; }
    .subheadline br { display: none; }
    
    .phone {
        width: 220px;
        height: 460px;
        border-radius: 36px;
        padding: 10px;
    }
    
    .phone-screen { border-radius: 28px; }
    .phone-notch { width: 80px; height: 24px; top: 10px; }
    .screen-content { padding: 48px 12px 12px; }
    
    .home-title { font-size: 22px; }
    .level-card, .lesson-card { padding: 12px; }
    .card-title { font-size: 15px; }
    .fc-char { font-size: 64px; }
    .speak-jp { font-size: 28px; }
    .mic-btn { width: 60px; height: 60px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .phone, .mic-pulse, .success-check { animation: none; }
    .screen { transition: none; }
}
