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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    color: #fff;
    padding: 2rem;
    overflow-x: hidden;
}

/* Animated Header Background */
.animated-header-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 320px;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.gradient-layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(240, 147, 251, 0.3) 0%,
        rgba(245, 87, 108, 0.25) 25%,
        rgba(168, 85, 247, 0.2) 50%,
        rgba(236, 72, 153, 0.25) 75%,
        rgba(240, 147, 251, 0.3) 100%
    );
    background-size: 400% 400%;
    animation: gradientShift 12s ease infinite;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0.8) 50%, rgba(0,0,0,0) 100%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0.8) 50%, rgba(0,0,0,0) 100%);
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
        filter: hue-rotate(0deg);
    }
    50% {
        background-position: 100% 50%;
        filter: hue-rotate(15deg);
    }
    100% {
        background-position: 0% 50%;
        filter: hue-rotate(0deg);
    }
}

/* Floating Icons */
.floating-icons {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.float-icon {
    position: absolute;
    width: 32px;
    height: 32px;
    color: rgba(255, 255, 255, 0.08);
    opacity: 0;
    animation: floatPulse 8s ease-in-out infinite;
}

@keyframes floatPulse {
    0% {
        opacity: 0;
        transform: scale(0.6) rotate(0deg);
    }
    20% {
        opacity: 1;
        transform: scale(1) rotate(5deg);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1) rotate(-5deg);
    }
    80% {
        opacity: 1;
        transform: scale(1) rotate(5deg);
    }
    100% {
        opacity: 0;
        transform: scale(0.6) rotate(0deg);
    }
}

/* Icon colors - add variety */
.icon-3, .icon-6, .icon-9, .icon-12, .icon-15 {
    color: rgba(245, 87, 108, 0.1);
}

.icon-2, .icon-5, .icon-8, .icon-11, .icon-14 {
    color: rgba(240, 147, 251, 0.1);
}

header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
}

/* Font Options for Logo */

/* Retro Ski Lodge */
.logo.font-bebas { font-family: 'Bebas Neue', sans-serif; letter-spacing: 4px; }
.logo.font-righteous { font-family: 'Righteous', sans-serif; }
.logo.font-fredoka { font-family: 'Fredoka', sans-serif; }
.logo.font-graduate { font-family: 'Graduate', serif; letter-spacing: 2px; }
.logo.font-staatliches { font-family: 'Staatliches', sans-serif; letter-spacing: 3px; }

/* Mountain Bold */
.logo.font-oswald { font-family: 'Oswald', sans-serif; font-weight: 700; }
.logo.font-anton { font-family: 'Anton', sans-serif; }
.logo.font-archivo { font-family: 'Archivo Black', sans-serif; }
.logo.font-russo { font-family: 'Russo One', sans-serif; }
.logo.font-titan { font-family: 'Titan One', sans-serif; }
.logo.font-ultra { font-family: 'Ultra', serif; }
.logo.font-lilita { font-family: 'Lilita One', sans-serif; }
.logo.font-dela { font-family: 'Dela Gothic One', sans-serif; }

/* Playful/Fun */
.logo.font-bangers { font-family: 'Bangers', cursive; letter-spacing: 3px; }
.logo.font-chewy { font-family: 'Chewy', cursive; }
.logo.font-luckiest { font-family: 'Luckiest Guy', cursive; }
.logo.font-concert { font-family: 'Concert One', sans-serif; }
.logo.font-slackey { font-family: 'Slackey', sans-serif; }
.logo.font-lemon { font-family: 'Lemon', serif; }
.logo.font-fugaz { font-family: 'Fugaz One', sans-serif; }

/* Script/Handwritten */
.logo.font-pacifico { font-family: 'Pacifico', cursive; font-size: 3.5rem; }
.logo.font-lobster { font-family: 'Lobster', cursive; font-size: 3.5rem; }
.logo.font-satisfy { font-family: 'Satisfy', cursive; font-size: 4rem; }
.logo.font-kaushan { font-family: 'Kaushan Script', cursive; font-size: 3.5rem; }
.logo.font-yellowtail { font-family: 'Yellowtail', cursive; font-size: 4rem; }
.logo.font-playball { font-family: 'Playball', cursive; font-size: 3.5rem; }
.logo.font-leckerli { font-family: 'Leckerli One', cursive; font-size: 3.5rem; }
.logo.font-gloria { font-family: 'Gloria Hallelujah', cursive; font-size: 2.5rem; }
.logo.font-shadows { font-family: 'Shadows Into Light', cursive; font-size: 3.5rem; }
.logo.font-marker { font-family: 'Permanent Marker', cursive; }

/* Modern Premium */
.logo.font-montserrat { font-family: 'Montserrat', sans-serif; font-weight: 900; letter-spacing: -2px; }
.logo.font-poppins { font-family: 'Poppins', sans-serif; font-weight: 900; }
.logo.font-josefin { font-family: 'Josefin Sans', sans-serif; font-weight: 700; letter-spacing: 3px; }
.logo.font-outfit { font-family: 'Outfit', sans-serif; font-weight: 900; }
.logo.font-rubik { font-family: 'Rubik Mono One', monospace; font-size: 2.5rem; }

/* Decorative/Wild */
.logo.font-bungee { font-family: 'Bungee', sans-serif; }
.logo.font-bungeeshade { font-family: 'Bungee Shade', sans-serif; font-size: 3.5rem; }
.logo.font-monoton { font-family: 'Monoton', sans-serif; font-size: 3.5rem; }
.logo.font-blackops { font-family: 'Black Ops One', sans-serif; }
.logo.font-cabin { font-family: 'Cabin Sketch', sans-serif; font-weight: 700; }
.logo.font-special { font-family: 'Special Elite', cursive; }
.logo.font-silkscreen { font-family: 'Silkscreen', monospace; font-size: 2.5rem; }
.logo.font-orbitron { font-family: 'Orbitron', sans-serif; font-weight: 900; font-size: 2.5rem; }
.logo.font-protest { font-family: 'Protest Riot', sans-serif; }
.logo.font-tilt { font-family: 'Tilt Warp', sans-serif; }
.logo.font-cinzel { font-family: 'Cinzel', serif; font-weight: 900; letter-spacing: 4px; }

.logo-container {
    height: 5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

h1.logo {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0;
}

.font-selector {
    display: none; /* Hidden - font randomly selected on load */
    /* display: flex; */
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 30px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.font-selector label {
    color: #8892b0;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.font-selector select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #fff;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
}

.font-selector select:hover {
    border-color: rgba(245, 87, 108, 0.5);
}

.font-selector select option,
.font-selector select optgroup {
    background: #1a1a2e;
    color: #fff;
}

.subtitle {
    color: #8892b0;
    font-size: 1.1rem;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.recipe-container {
    display: flex;
    gap: 1.5rem;
    align-items: stretch;
}

.main-recipe-wrapper {
    flex: 2;
    position: relative;
}

.main-recipe {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 2rem;
    padding-bottom: 6rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 400px;
    position: relative;
}

.refresh-circle-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.refresh-circle-btn:hover {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-color: transparent;
    transform: rotate(180deg);
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
}

.refresh-circle-btn svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: rgba(255, 255, 255, 0.7);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.refresh-circle-btn:hover svg {
    stroke: #fff;
}

.main-recipe h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.main-recipe .recipe-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.main-recipe .category {
    display: inline-block;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.main-recipe .source-tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.7);
}

.main-recipe .glass {
    color: #8892b0;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.main-recipe .ingredients {
    margin-bottom: 1.5rem;
}

.main-recipe .ingredients h3 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #8892b0;
    margin-bottom: 0.75rem;
}

.main-recipe .ingredient {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.main-recipe .ingredient:last-child {
    border-bottom: none;
}

.main-recipe .ingredient .name {
    color: #fff;
}

.main-recipe .ingredient .amount {
    color: #f5576c;
    font-weight: 600;
}

.main-recipe .ingredient .original-ingredient {
    color: #8892b0;
    font-size: 0.85em;
}

.main-recipe .instructions {
    margin-bottom: 1.5rem;
}

.main-recipe .instructions h3 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #8892b0;
    margin-bottom: 0.75rem;
}

.main-recipe .instructions p {
    color: #ccd6f6;
    line-height: 1.6;
}

.main-recipe .garnish {
    color: #8892b0;
    font-style: italic;
}

.servings-control {
    position: absolute;
    bottom: 1.5rem;
    left: 2rem;
    right: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 16px;
    z-index: 10;
}

.servings-control label {
    color: #8892b0;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.servings-control input[type="range"] {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    outline: none;
}

.servings-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(245, 87, 108, 0.4);
}

.servings-control input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 10px rgba(245, 87, 108, 0.4);
}

#servings-display {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f5576c;
    min-width: 2rem;
    text-align: center;
}


.variations {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.variation-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: all 0.3s ease;
}

.variation-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(245, 87, 108, 0.3);
    transform: translateX(-4px);
}

.variation-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.variation-card .diff {
    font-size: 0.85rem;
    color: #8892b0;
}

.variation-card .diff strong {
    color: #f5576c;
}

.refresh-btn {
    display: block;
    margin: 2rem auto 0;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border: none;
    border-radius: 30px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.refresh-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(245, 87, 108, 0.3);
}

@media (max-width: 768px) {
    .recipe-container {
        flex-direction: column;
    }

    .variations {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .variation-card {
        flex: 1;
        min-width: 140px;
    }

    h1 {
        font-size: 2rem;
    }

    .animated-header-bg {
        height: 220px;
    }

    .float-icon {
        width: 24px;
        height: 24px;
    }

    .float-icon:nth-child(n+6) {
        display: none;
    }
}

/* Settings Panel */
.settings-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
    pointer-events: auto;
}

.settings-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
}

.settings-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(45deg);
}

.settings-btn svg {
    width: 20px;
    height: 20px;
    color: rgba(255, 255, 255, 0.8);
}

.settings-panel {
    position: absolute;
    top: 50px;
    right: 0;
    background: rgba(30, 30, 50, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 1rem;
    min-width: 250px;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.settings-panel.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.settings-panel h3 {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.source-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.source-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.source-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.source-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #f093fb;
    cursor: pointer;
}

.source-item label {
    flex: 1;
    cursor: pointer;
    font-size: 0.85rem;
}

.source-item .source-count {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
}

.setting-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
}

.setting-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #f093fb;
    cursor: pointer;
}

.setting-item label {
    cursor: pointer;
    font-size: 0.95rem;
}

.setting-hint {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    margin: 0.25rem 0.5rem 0.5rem;
    font-style: italic;
}
