/* Base Variables (Default: Speakeasy / Dark Mode) */
:root {
    --bg-primary: #1A1A1A;
    --bg-surface: #2A2A2A;
    --text-primary: #F5F1E8;
    --accent-primary: #D4AF37;
    /* Gold */
    --accent-secondary: #6B1F3D;
    /* Burgundy */
    --nav-bg: rgba(26, 26, 26, 0.8);
}

/* Mixology Theme (Light Mode) */
/* Mixology Theme (Light Mode) */
.light {
    --bg-primary: #F5F1E8;
    /* Cream */
    --bg-surface: #FFFFFF;
    --text-primary: #1A1A1A;
    --accent-primary: #ec4899;
    /* Pink */
    --accent-secondary: #06b6d4;
    /* Cyan */
    --nav-bg: rgba(255, 255, 255, 0.9);
}

/* Global Styles */
body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.5s ease, color 0.3s ease;
}

/* Animated Gradient Background for Mixology Mode */
.light body {
    background: linear-gradient(135deg, #ffeef8 0%, #e0f7ff 50%, #f3e7ff 100%);
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
    position: relative;
}

.light body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(at 20% 30%, rgba(236, 72, 153, 0.1) 0px, transparent 50%),
        radial-gradient(at 80% 70%, rgba(6, 182, 212, 0.1) 0px, transparent 50%),
        radial-gradient(at 50% 50%, rgba(168, 85, 247, 0.08) 0px, transparent 50%);
    animation: float 20s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
    /* Fix cut-off: Make it larger than viewport */
    width: 150%;
    height: 150%;
    left: -25%;
    top: -25%;
}

/* Animated Gradient for Dark Mode */
body::before {
    content: '';
    position: fixed;
    top: -25%;
    left: -25%;
    width: 150%;
    height: 150%;
    background-image:
        radial-gradient(at 80% 20%, rgba(212, 175, 55, 0.15) 0px, transparent 50%),
        radial-gradient(at 20% 80%, rgba(128, 0, 32, 0.1) 0px, transparent 50%);
    animation: float 25s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
}

/* Ensure content is above gradient */
main,
nav,
footer {
    position: relative;
    z-index: 1;
}

/* ADMIN PAGES: Disable decorative effects */
body.admin-page::before,
.admin-page body::before {
    display: none !important;
}

body.admin-page {
    background: #f3f4f6 !important; /* Tailwind gray-100 */
    color: #1f2937 !important; /* Tailwind gray-800 */
}

/* Disable hover transform on admin buttons */
body.admin-page a[href]:hover,
body.admin-page button:hover {
    transform: none;
    filter: none;
}

/* Navbar Blur with smooth shadow */
#navbar {
    background-color: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

#navbar:hover {
    backdrop-filter: blur(16px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.light #navbar {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* Link Hover Effects */
nav a {
    position: relative;
    transition: all 0.3s ease;
}

nav a:not(#logo-link)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

nav a:not(#logo-link):hover::after {
    width: 80%;
}

/* Specific Style for Logo Text Underline */
#logo-link span {
    position: relative;
}

#logo-link span::after {
    content: '';
    position: absolute;
    bottom: 0px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: all 0.3s ease;
}

#logo-link:hover span::after {
    width: 100%;
}

/* Button Animations */
a[href],
button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

a[href]:hover,
button:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

a[href]:active,
button:active {
    transform: translateY(0);
}

/* Card Hover Effects with Tilt */
article.group {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

article.group:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

article.group img {
    transition: transform 0.6s ease;
}

article.group:hover img {
    transform: scale(1.1) rotate(1deg);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

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

    50% {
        transform: translate(-30px, 20px) scale(1.1);
    }

    100% {
        transform: translate(0px, 0px) scale(1);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-400 {
    animation-delay: 0.4s;
}

/* Scroll Reveal Effect */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Toggle Switch Animation with Pulse */
#toggle-circle,
#toggle-circle-mobile {
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

#theme-toggle:hover #toggle-circle,
#theme-toggle-mobile:hover #toggle-circle-mobile {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.light #toggle-circle,
.light #toggle-circle-mobile {
    transform: translateX(1.75rem);
    background-color: #ec4899;
    box-shadow: 0 2px 12px rgba(236, 72, 153, 0.5);
}

/* Shimmer Effect on Hover */
.shimmer-on-hover {
    position: relative;
    overflow: hidden;
}

.shimmer-on-hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent);
    transition: left 0.5s ease;
}

.shimmer-on-hover:hover::before {
    left: 100%;
}

/* Welcome Modal Animation */
#welcome-modal {
    transition: opacity 0.5s ease;
}

#modal-container {
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Category Filter Pills */
button[data-filter] {
    position: relative;
    overflow: hidden;
}

button[data-filter]::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button[data-filter]:hover::before {
    width: 300px;
    height: 300px;
}

/* Parallax Effect Class */
.parallax {
    transform: translateZ(0);
    will-change: transform;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

.modal-enter {
    animation: modal-in 0.3s ease-out forwards;
}

@keyframes modal-in {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }

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

/* Glassmorphism & Animations - Added for Premium UX */
/* Glassmorphism & Animations - Standard CSS Replacement */
.glass-panel {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.dark .glass-panel {
    background-color: rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 255, 255, 0.1);
}

.input-premium {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    border: 1px solid #d1d5db;
    /* gray-300 */
    border-radius: 0.75rem;
    /* rounded-xl */
    padding: 0.75rem 1rem;
    color: #111827;
    /* gray-900 */
    font-weight: 500;
    transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.input-premium::placeholder {
    color: #6b7280;
    /* gray-500 */
}

.input-premium:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(236, 72, 153, 0.5);
    /* ring-accent/50 (approx pink) */
    border-color: var(--accent-primary);
}

/* DARK MODE: sfondo COMPLETAMENTE NERO con testo BIANCO */
.dark .input-premium {
    background-color: #1a1a1a !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
}

.dark .input-premium::placeholder {
    color: rgba(255, 255, 255, 0.4) !important;
}

.dark .input-premium:focus {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
    outline: none;
    border-color: rgba(212, 175, 55, 0.5) !important;
}


@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-4px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(4px);
    }
}

.animate-shake {
    animation: shake 0.4s cubic-bezier(.36, .07, .19, .97) both;
}

/* Toast Notification */
#toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: var(--bg-surface);
    color: var(--text-primary);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--accent-primary);
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-width: 300px;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast i {
    color: var(--accent-primary);
}

.toast p {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 500;
}