/* global.css */

@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=DM+Sans:wght@400;500;600&display=swap");

:root {
    --color-primary: #2d5016;
    --color-primary-light: #4a7c2c;
    --color-accent: #ff6b35;
    --color-bg: #fdfaf6;
    --color-card: #ffffff;
    --color-text: #2c2c2c;
    --color-text-muted: #6b7280;
    --color-border: #e8e3db;
    --color-success: #4a7c2c;
    --color-danger: #dc2626;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(45, 80, 22, 0.08);
    --shadow-lg: 0 10px 30px rgba(45, 80, 22, 0.12);
    --radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background: linear-gradient(135deg, #fdfaf6 0%, #f5f1e8 100%);
    font-family:
        "DM Sans",
        -apple-system,
        BlinkMacSystemFont,
        sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: var(--color-text);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(
        circle,
        rgba(74, 124, 44, 0.08) 0%,
        transparent 70%
    );
    border-radius: 50%;
    z-index: 0;
    animation: float 20s ease-in-out infinite;
}

body::after {
    content: "";
    position: fixed;
    bottom: -30%;
    left: -15%;
    width: 600px;
    height: 600px;
    background: radial-gradient(
        circle,
        rgba(255, 107, 53, 0.06) 0%,
        transparent 70%
    );
    border-radius: 50%;
    z-index: 0;
    animation: float 15s ease-in-out infinite reverse;
}

@keyframes float {
    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(30px, 30px) scale(1.1);
    }
}

.section-center {
    position: relative;
    z-index: 1;
    margin: 0 auto;
    margin-top: 4rem;
    max-width: 540px;
    background: var(--color-card);
    border-radius: var(--radius);
    padding: 0;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: slideIn 0.5s ease-out;
}

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

/* Header */
.grocery-header {
    background: linear-gradient(
        135deg,
        var(--color-primary) 0%,
        var(--color-primary-light) 100%
    );
    padding: 2.5rem 2rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.grocery-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 1;
}

.grocery-header h1 {
    font-family: "Playfair Display", serif;
    font-size: 2.5rem;
    font-weight: 900;
    color: white;
    margin: 0;
    position: relative;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.grocery-header p {
    color: rgba(255, 255, 255, 0.9);
    margin-top: 0.5rem;
    font-size: 0.95rem;
    position: relative;
    font-weight: 500;
}

#app {
    padding: 2rem;
}

/* Toast Notification */
#toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-danger);
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    opacity: 0;
    pointer-events: none;
    transition:
        opacity 0.4s ease,
        transform 0.4s ease;
    font-size: 0.9rem;
    z-index: 999;
}

#toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(-10px);
}
