/* Teilzeitkoch - Warmes Bistro Theme */

:root {
    /* Primary Colors */
    --primary: #FF6B6B;
    --primary-light: #FF8E8E;
    --primary-dark: #EE5A5A;

    /* Secondary Colors */
    --secondary: #845EC2;
    --secondary-light: #A178DF;

    /* Accent Colors */
    --teal: #00C9A7;
    --yellow: #FFB830;
    --blue: #4D96FF;

    /* Neutrals */
    --text-primary: #2D3142;
    --text-secondary: #6B7280;
    --bg-primary: #FAFBFC;
    --bg-card: #FFFFFF;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #FF6B6B 0%, #FF8E8E 50%, #FFB830 100%);
    --gradient-secondary: linear-gradient(135deg, #845EC2 0%, #A178DF 100%);
    --gradient-fresh: linear-gradient(135deg, #00C9A7 0%, #4D96FF 100%);
    --gradient-warm: linear-gradient(135deg, #FF6B6B 0%, #845EC2 100%);
    --gradient-bg: linear-gradient(180deg, #FAFBFC 0%, #F0F4F8 100%);
}

/* ===== Typography ===== */

html, body {
    font-family: 'Nunito', 'Segoe UI', sans-serif;
    margin: 0;
    padding: 0;
    background: var(--gradient-bg);
    min-height: 100vh;
}

.mud-typography, .mud-typography *, .mud-input, .mud-button {
    font-family: 'Nunito', 'Segoe UI', sans-serif !important;
}

.mud-typography-h1, .mud-typography-h2, .mud-typography-h3,
.mud-typography-h4, .mud-typography-h5 {
    font-family: 'Playfair Display', 'Georgia', serif !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em;
}

h1:focus {
    outline: none;
}

/* ===== AppBar ===== */

.mud-appbar {
    background: var(--gradient-primary) !important;
    box-shadow: 0 4px 20px rgba(255, 107, 107, 0.3) !important;
}

.mud-appbar .mud-primary-text,
.mud-appbar .mud-typography {
    color: white !important;
}

/* ===== Buttons ===== */

.mud-button-filled.mud-button-primary {
    background: var(--gradient-primary) !important;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    transition: all 0.3s ease;
}

.mud-button-filled.mud-button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.5);
}

.mud-button-filled.mud-button-secondary {
    background: var(--gradient-secondary) !important;
    box-shadow: 0 4px 15px rgba(132, 94, 194, 0.4);
}

/* ===== Cards ===== */

.mud-paper, .mud-card {
    border-radius: 20px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
    transition: all 0.3s ease;
}

.mud-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12) !important;
}

/* ===== Recipe Cards ===== */

.recipe-card {
    border-radius: 24px !important;
    overflow: hidden;
    background: white;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.recipe-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 60px rgba(255, 107, 107, 0.2) !important;
}

/* ===== Chips ===== */

.mud-chip {
    border-radius: 20px !important;
    font-weight: 600;
}

.mud-chip.mud-chip-color-primary {
    background: var(--gradient-primary) !important;
    color: white !important;
}

/* ===== Inputs ===== */

.mud-input-outlined .mud-input-outlined-border {
    border-radius: 12px !important;
    border-width: 2px !important;
}

.mud-input-outlined:focus-within .mud-input-outlined-border {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.2);
}

/* ===== Navigation ===== */

.mud-nav-link.active {
    background: linear-gradient(90deg, rgba(255, 107, 107, 0.15) 0%, transparent 100%) !important;
    border-left: 4px solid var(--primary);
}

.mud-drawer {
    border-right: none !important;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.05) !important;
}

/* ===== Bottom Navigation (Mobile) ===== */

.bottom-nav {
    background: white !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1) !important;
    border-radius: 24px 24px 0 0;
}

/* ===== Snackbar ===== */

.mud-snackbar {
    border-radius: 16px !important;
}

/* ===== Loading ===== */

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
}

.loading-progress circle {
    fill: none;
    stroke: #E5E7EB;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: url(#gradient) var(--primary);
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Laden");
}

/* ===== Error UI ===== */

#blazor-error-ui {
    background: var(--primary);
    bottom: 0;
    box-shadow: 0 -4px 20px rgba(255, 107, 107, 0.3);
    display: none;
    left: 0;
    padding: 0.8rem 1.5rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    border-radius: 16px 16px 0 0;
    color: white;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: var(--primary);
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
    border-radius: 16px;
}

.blazor-error-boundary::after {
    content: "Ein Fehler ist aufgetreten."
}

/* ===== Staggered Entrance Animations ===== */

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes floatBob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

@keyframes blobFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(20px, -15px) scale(1.05); }
    66% { transform: translate(-10px, 10px) scale(0.95); }
}

.animate-in {
    animation: fadeSlideUp 0.6s ease-out forwards;
    opacity: 0;
}

.animate-in.delay-1 { animation-delay: 0.1s; }
.animate-in.delay-2 { animation-delay: 0.2s; }
.animate-in.delay-3 { animation-delay: 0.3s; }
.animate-in.delay-4 { animation-delay: 0.4s; }
.animate-in.delay-5 { animation-delay: 0.5s; }
.animate-in.delay-6 { animation-delay: 0.6s; }

.animate-scale {
    animation: scaleIn 0.5s ease-out forwards;
    opacity: 0;
}

/* ===== Hero Section ===== */

.hero-section {
    position: relative;
    padding: 48px 0 32px;
    margin-bottom: 32px;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-family: 'Playfair Display', serif !important;
    font-size: 2.8rem !important;
    font-weight: 700 !important;
    line-height: 1.2;
    background: linear-gradient(135deg, #2D3142 0%, #FF6B6B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 500px;
}

.hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    z-index: 0;
    animation: blobFloat 8s ease-in-out infinite;
}

.hero-blob-1 {
    width: 350px;
    height: 350px;
    background: var(--primary-light);
    top: -100px;
    right: -50px;
}

.hero-blob-2 {
    width: 250px;
    height: 250px;
    background: var(--secondary-light);
    bottom: -80px;
    left: -30px;
    animation-delay: -3s;
}

/* ===== Stat Cards ===== */

.stat-card {
    background: white;
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: 'Playfair Display', serif;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Category Icons ===== */

.category-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

/* ===== Fun Hover Effects ===== */

.wiggle:hover {
    animation: wiggle 0.5s ease-in-out;
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-3deg); }
    75% { transform: rotate(3deg); }
}

.bounce:hover {
    animation: bounce 0.6s ease;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ===== Scrollbar ===== */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ===== Section Headings ===== */

.section-heading {
    position: relative;
    display: inline-block;
    padding-bottom: 8px;
}

.section-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

/* ===== Dark Mode Overrides ===== */

.mud-theme-dark .hero-title {
    background: linear-gradient(135deg, #F8F8F2 0%, #FF8E8E 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mud-theme-dark .hero-blob {
    opacity: 0.15;
}

.mud-theme-dark .stat-card {
    background: var(--mud-palette-surface);
}

.mud-theme-dark .recipe-card {
    background: var(--mud-palette-surface);
}

.mud-theme-dark ::-webkit-scrollbar-track {
    background: #1A1B26;
}

.mud-theme-dark ::-webkit-scrollbar-thumb {
    background: #3A3B5A;
}

/* ===== Responsive ===== */

@media (max-width: 600px) {
    .mud-main-content {
        padding-bottom: 80px !important;
    }

    .hero-title {
        font-size: 2rem !important;
    }

    .hero-section {
        padding: 24px 0 16px;
    }
}

@media (max-width: 960px) {
    .hero-title {
        font-size: 2.2rem !important;
    }
}

/* ===== Print ===== */

@media print {
    .mud-appbar,
    .mud-drawer,
    .no-print {
        display: none !important;
    }

    .mud-main-content {
        padding: 0 !important;
    }
}
