/* ==========================================================================
   Base Styles - Layout, Farben, Typografie
   Kindgerechtes, freundliches Design
   ========================================================================== */

:root {
    /* Hauptfarben - freundlich und einladend */
    --color-primary: #6366f1;
    --color-primary-light: #818cf8;
    --color-primary-dark: #4f46e5;

    --color-secondary: #64748b;
    --color-secondary-light: #94a3b8;

    /* Akzentfarben */
    --color-success: #22c55e;
    --color-success-light: #86efac;
    --color-error: #ef4444;
    --color-error-light: #fca5a5;
    --color-warning: #f59e0b;
    --color-warning-light: #fcd34d;

    /* Hintergrund mit sanftem Gradient */
    --color-bg: #f0f4ff;
    --color-bg-gradient: linear-gradient(135deg, #e0e7ff 0%, #f0f4ff 50%, #fdf4ff 100%);
    --color-bg-card: #ffffff;
    --color-text: #1e293b;
    --color-text-light: #64748b;
    --color-text-muted: #94a3b8;
    --color-border: #e2e8f0;

    /* Sprachfarben - lebendig */
    --color-lang-de: #fbbf24;
    --color-lang-en: #3b82f6;
    --color-lang-fr: #8b5cf6;
    --color-lang-es: #ef4444;
    --color-lang-it: #22c55e;

    /* Abstände */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-xxl: 3rem;

    /* Typografie */
    --font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.25rem;
    --font-size-xl: 1.5rem;
    --font-size-xxl: 2rem;
    --font-size-huge: 2.5rem;

    /* Rundungen - weicher, freundlicher */
    --border-radius-sm: 0.5rem;
    --border-radius: 1rem;
    --border-radius-lg: 1.5rem;
    --border-radius-xl: 2rem;
    --border-radius-full: 50%;

    /* Schatten - sanft und modern */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-colored: 0 10px 30px -10px rgba(99, 102, 241, 0.4);

    /* Animationen - kindgerecht langsam */
    --transition-fast: 0.5s ease;
    --transition-normal: 0.8s ease;
    --transition-slow: 1.2s ease;
}

/* Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg-gradient);
    background-attachment: fixed;
    min-height: 100vh;
}

/* Container */
.container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: var(--spacing-lg);
}

/* Typografie */
h1, h2, h3 {
    margin-top: 0;
    margin-bottom: var(--spacing-md);
    line-height: 1.3;
    font-weight: 700;
    color: var(--color-text);
}

h1 {
    font-size: var(--font-size-xxl);
    text-align: center;
}

p {
    margin-top: 0;
    margin-bottom: var(--spacing-md);
}

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

a:hover {
    color: var(--color-primary-dark);
}

/* Flash Messages */
.flash {
    padding: var(--spacing-md) var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    border-radius: var(--border-radius);
    text-align: center;
    font-weight: 500;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.flash {
    animation: slideDown 0.8s ease;
}

.flash-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.flash-error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border: 1px solid #f87171;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-muted {
    color: var(--color-text-muted);
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: var(--spacing-xxl);
    background: var(--color-bg-card);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow);
}

.empty-state-icon {
    display: block;
    font-size: 4rem;
    margin-bottom: var(--spacing-lg);
    opacity: 0.8;
}

.empty-state-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--spacing-sm);
}

.empty-state-text {
    font-size: var(--font-size-base);
    color: var(--color-text-muted);
    margin-bottom: 0;
}

/* ==========================================================================
   Responsive Base Styles
   ========================================================================== */

/* iPad (768px - 1024px) */
@media (max-width: 1024px) {
    :root {
        --font-size-huge: 2.25rem;
        --font-size-xxl: 1.75rem;
        --spacing-xxl: 2.5rem;
    }

    .container {
        max-width: 100%;
        padding: var(--spacing-md);
    }
}

/* Tablet small / Large phones (600px - 768px) */
@media (max-width: 768px) {
    :root {
        --font-size-huge: 2rem;
        --font-size-xxl: 1.5rem;
        --font-size-xl: 1.25rem;
        --spacing-xxl: 2rem;
        --spacing-xl: 1.5rem;
    }

    h1 {
        font-size: var(--font-size-xl);
    }

    .empty-state {
        padding: var(--spacing-xl);
        border-radius: var(--border-radius-lg);
    }

    .empty-state-icon {
        font-size: 3rem;
    }
}

/* Phones (390px - 600px) */
@media (max-width: 600px) {
    :root {
        --font-size-huge: 1.75rem;
        --font-size-xxl: 1.375rem;
        --font-size-xl: 1.125rem;
        --font-size-lg: 1rem;
        --spacing-xxl: 1.5rem;
        --spacing-xl: 1.25rem;
        --spacing-lg: 1rem;
    }

    .container {
        padding: var(--spacing-sm);
    }

    .flash {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: var(--font-size-sm);
        border-radius: var(--border-radius-sm);
    }

    .empty-state {
        padding: var(--spacing-lg);
        border-radius: var(--border-radius);
    }

    .empty-state-icon {
        font-size: 2.5rem;
        margin-bottom: var(--spacing-md);
    }

    .empty-state-title {
        font-size: var(--font-size-lg);
    }

    .empty-state-text {
        font-size: var(--font-size-sm);
    }
}

/* iPhone 12 mini and smaller (375px) */
@media (max-width: 390px) {
    :root {
        --font-size-huge: 1.5rem;
        --font-size-xxl: 1.25rem;
        --font-size-xl: 1.1rem;
        --font-size-lg: 0.95rem;
        --font-size-base: 0.9rem;
        --font-size-sm: 0.8rem;
        --spacing-lg: 0.875rem;
        --spacing-md: 0.75rem;
    }

    html {
        font-size: 15px;
    }

    .container {
        padding: var(--spacing-xs);
    }

    .empty-state {
        padding: var(--spacing-md);
    }

    .empty-state-icon {
        font-size: 2rem;
    }
}
