/* =========================================
   Theme CSS - Color Tokens & Global Styles
   ========================================= */

:root {
    /* Color Palette - Elegant & Romantic */
    --clr-bg: #FAF6F3;
    --clr-surface: rgba(255, 255, 255, 0.75);
    --clr-surface-border: rgba(255, 255, 255, 0.9);
    --clr-primary: #D4A373;
    /* Warm blush/sand */
    --clr-primary-hover: #C59363;
    --clr-secondary: #E3D5CA;
    --clr-secondary-hover: #D5C5B8;

    --clr-text-main: #343A40;
    --clr-text-muted: #6C757D;
    --clr-text-novel: #2B2B2B;

    --clr-accent: #E5989B;
    /* Sweet soft pink accent */
    --clr-shadow: rgba(0, 0, 0, 0.05);

    /* Typography */
    --font-ui: 'Inter', system-ui, sans-serif;
    --font-roman: 'Playfair Display', serif;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

body {
    background-color: var(--clr-bg);
    color: var(--clr-text-main);
    font-family: var(--font-ui);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* --- Floating Background Elements --- */
.background-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    /* Soft glowing gradient blobs */
    background: radial-gradient(circle at 20% 30%, rgba(229, 152, 155, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(212, 163, 115, 0.15) 0%, transparent 40%);
}

.particle {
    position: absolute;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    animation: float-up linear infinite;
}

@keyframes float-up {
    from {
        transform: translateY(100vh) scale(0.8);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    to {
        transform: translateY(-20vh) scale(1.2);
        opacity: 0;
    }
}

/* APP SHELL */
.app-container {
    width: 100%;
    max-width: 800px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

@media (min-width: 850px) {
    .app-container {
        height: 90vh;
        /* Floating container feeling on desktop */
    }
}

/* View Toggling */
.view {
    display: none;
    width: 100%;
    height: 100%;
    opacity: 0;
    animation: fadeIn var(--transition-smooth) forwards;
}

.view.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.view.hidden {
    display: none !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Glassmorphism Cards --- */
.glass-card {
    background: var(--clr-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--clr-surface-border);
    border-radius: 24px;
    box-shadow: 0 16px 40px var(--clr-shadow);
    padding: 3rem;
    width: 90%;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

/* --- Buttons --- */
.btn {
    font-family: var(--font-ui);
    padding: 1rem 2rem;
    font-size: 1.05rem;
    font-weight: 500;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    outline: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 300px;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background-color: var(--clr-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(212, 163, 115, 0.4);
}

.btn-primary:hover {
    background-color: var(--clr-primary-hover);
    box-shadow: 0 6px 20px rgba(212, 163, 115, 0.6);
}

.btn-secondary {
    background-color: var(--clr-secondary);
    color: var(--clr-text-main);
    margin-top: 1rem;
}

.btn-secondary:hover {
    background-color: var(--clr-secondary-hover);
}

.btn-text {
    background: transparent;
    color: var(--clr-text-muted);
    text-decoration: underline;
    text-underline-offset: 4px;
    padding: 0.5rem 1rem;
}

.btn-text:hover {
    color: var(--clr-text-main);
}

.hidden {
    display: none !important;
}

.mt-4 {
    margin-top: 1.5rem;
    flex-shrink: 0;
}

/* --- Welcome View specific --- */
.welcome-title {
    font-family: var(--font-roman);
    font-size: 3rem;
    color: var(--clr-text-main);
    margin-bottom: 1rem;
}

.welcome-subtitle {
    font-size: 1.1rem;
    color: var(--clr-text-muted);
    margin-bottom: 2.5rem;
}

.welcome-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}