/* Dynamic variables controlled via JS */
:root {
    --main-color: #bd93f9;       /* Main neon color */
    --accent-color: #ff79c6;     /* Accent color / slider */
    --glow-color: rgba(187, 134, 252, 0.1); 
    --bg-grad-1: #1a1525;        /* Radial gradient center */
    --bg-grad-2: #0a0813;        /* Radial gradient edges */
    --pulse-duration: 3s;        /* Pulse speed */
}

/* Disable blue highlight */
* {
    -webkit-tap-highlight-color: transparent;
}

@font-face {
  font-family: 'Akt';
  src: url('../fonts/Akt-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 900; 
  font-style: normal;
  font-display: block;
}

/* Preloader */
.preloader {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: #0a0813;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s ease;
}
.preloader.hidden {
    opacity: 0;
    pointer-events: none;
}
.preloader-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid #3b3554;
    border-top-color: #bd93f9;
    border-radius: 50%;
    animation: preloader-spin 0.8s linear infinite;
}
@keyframes preloader-spin {
    to { transform: rotate(360deg); }
}

html {
    overflow-x: clip;
}

body {
    font-family: 'Akt', sans-serif;
    background: radial-gradient(circle at center, var(--bg-grad-1) 0%, var(--bg-grad-2) 100%);
    color: #e2e8f0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    margin: 0;
    padding: 20px 10px;
    box-sizing: border-box;
    overflow-x: clip;
    transition: background 0.4s ease;
}

/* User agent stylesheet reset */
button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* General wrapper */
.wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 600px;
    position: relative;
    min-height: calc(100vh - 40px);
}

/* Container with neon glow */
.container {
    background: rgba(30, 27, 46, 0.7);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 25px;
    border-radius: 24px;
    animation: neonContainerPulse var(--pulse-duration) infinite alternate ease-in-out;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.4s ease;
}

/* Sticky header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(19, 17, 28, 0.3);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin: -20px calc(50% - 50vw) 0;
    padding: 16px 0;
}
.site-header-inner {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.site-header-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-left: auto;

}
.site-logo {
    margin: 0;
    background: linear-gradient(45deg, var(--accent-color), var(--main-color), #8be9fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 18px;
    font-weight: 800;
    text-align: left;
    letter-spacing: 0.3px;
    user-select: none;
    cursor: pointer;
    transition: ease 0.2s;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
}
.site-logo:hover {
    transform: scale(1.05);
}
.site-header-hint {
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 400;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.2s;
    letter-spacing: 0.5px;
    user-select: none;
    text-decoration: none;
}
.site-header-hint:hover {
    color: var(--accent-color);
}

.site-header-hint.current {
    color: var(--main-color);
    cursor: default;
}

/* Burger menu */
.burger {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 0;
    background: transparent;
    border: 1px solid #3b3554;
    border-radius: 10px;
    cursor: pointer;
    flex-shrink: 0;
    margin-left: auto;
}
.burger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--main-color);
    transition: transform 0.25s ease, opacity 0.25s ease;
}
.burger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.burger.active span:nth-child(2) {
    opacity: 0 !important;
}
.burger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.burger-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 4px;
    padding: 8px 16px 16px;
    background: rgba(19, 17, 28, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 49;
}
.burger-menu.open {
    display: flex;
}
.burger-menu a {
    display: block;
    padding: 10px 12px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 10px;
    transition: background 0.2s, color 0.2s;
    user-select: none;
}
.burger-menu a:hover {
    background: var(--glow-color);
    color: var(--accent-color);
}
.burger-menu .burger-menu-current {
    display: block;
    padding: 10px 12px;
    color: var(--main-color);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: default;
    user-select: none;
}

.burger-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
    z-index: 48;
}
.burger-overlay.open {
    opacity: 1;
    visibility: visible;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

label {
    display: block;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--main-color);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    transition: color 0.4s ease;
}

/* Selection fields */
select, input[type="range"] {
    width: 100%;
    padding: 12px;
    background-color: #13111c;
    border: 1px solid #3b3554;
    border-radius: 10px;
    color: #fff;
    font-size: 15px;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

select:focus {
    outline: none;
    border-color: var(--main-color);
    box-shadow: 0 0 12px var(--glow-color);
}

/* Segmented control */
.segmented {
    display: flex;
    background: #13111c;
    border: 1px solid #3b3554;
    border-radius: 10px;
    overflow: hidden;
}

.segmented label {
    flex: 1;
    text-align: center;
    padding: 10px 5px;
    font-size: 14px;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    margin-bottom: 0px;
}

.segmented label + label {
    border-left: 1px solid #3b3554;
}

.segmented input { display: none; }

.segmented label:has(input:checked) {
    background: linear-gradient(135deg, var(--glow-color), rgba(139, 233, 253, 0.1));
    color: var(--accent-color);
    font-weight: 700;
    box-shadow: inset 0 0 10px var(--glow-color);
}

/* Bottom sheet trigger */
.pref-trigger {
    width: 100%;
    padding: 14px 16px;
    background: #13111c;
    border: 1px solid #3b3554;
    border-radius: 12px;
    color: #fff;
    font-size: 15px;
    line-height: 1.4;
    min-height: 52px;
    box-sizing: border-box;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    white-space: nowrap;
}
.trigger-text {
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.trigger-arrow {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath fill='%2394a3b8' d='M480-360 280-560h400L480-360Z'/%3E%3C/svg%3E") center/contain no-repeat;
    transition: transform 0.25s ease;
}
.pref-trigger.active .trigger-arrow {
    transform: rotate(180deg);
}
.pref-trigger:hover { border-color: var(--main-color); }
.pref-trigger:focus {
    outline: none;
    border-color: var(--main-color);
    box-shadow: 0 0 12px var(--glow-color);
}

/* Bottom sheet */
.sheet-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 100;
    display: flex;
    align-items: flex-end;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.25s, visibility 0.25s;
}
.sheet-overlay.open {
    visibility: visible;
    opacity: 1;
}

.sheet {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    background: #1a1525;
    border-radius: 20px 20px 0 0;
    padding: 12px 20px 24px;
    box-sizing: border-box;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}
.sheet-overlay.open .sheet {
    transform: translateY(0);
}

.sheet-handle {
    width: 36px;
    height: 4px;
    background: #3b3554;
    border-radius: 2px;
    margin: 0 auto 14px;
    z-index: 1;
    touch-action: none;
}
.sheet-handle::before {
    content: '';
    position: absolute;
    border-radius: inherit;
    inset: 0 0 auto 0;
    width: 100%;
    height: 30px;
}

.sheet-title {
    font-size: 13px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 12px;
    text-align: center;
    user-select: none;
}

.content {
    padding-bottom: 16px;
    font-size: 15px;
    line-height: 1.6;
    color: #e2e8f0;
    text-align: justify;
}
.content p {
    margin: 0 0 12px;
}
.content a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
}
/* .content a:hover {
    text-decoration: underline;
} */
.content-meta {
    font-size: 13px !important;
    color: #94a3b8 !important;
    line-height: 1.5 !important;
}

/* About page */
.about-page-head {
    margin-bottom: 18px;
}
.about-back {
    display: inline-block;
    color: #94a3b8;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 14px;
    border: 1px solid #3b3554;
    border-radius: 10px;
    transition: all 0.2s;
    user-select: none;
}
.about-back:hover {
    color: var(--main-color);
    border-color: var(--main-color);
}

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 6px;
}

.breadcrumb-link {
    color: #3b3554;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
    user-select: none;
    text-decoration: none !important;
}
.breadcrumb-link:hover {
    color: var(--accent-color);
    text-decoration: underline;
}
.breadcrumb-sep {
    color: #3b3554;
    font-size: 14px;
    user-select: none;
}
.breadcrumb-current {
    color: var(--main-color);
    font-size: 14px;
    user-select: none;
}

/* Email spoiler (anti-parse) */
.content .email-spoiler {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid #3b3554;
    color: #94a3b8;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
    text-decoration: none;
    transition: border-color 0.25s ease, color 0.25s ease;
}
.content .email-spoiler:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}
.content .email-spoiler.revealed {
    color: var(--main-color);
}

.content .email-spoiler.revealed:hover {
    border-color: var(--main-color);
}

.content-intro {
    font-size: 16px !important;
    font-weight: 500;
}
.content-heading {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--main-color);
    margin: 18px 0 8px;
    line-height: 1.4;
}
.content-heading-first {
    margin-top: 0;
}
.content-features {
    list-style: none;
    margin: 0 0 4px;
    padding: 0;
}
.content-features li {
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 15px;
    line-height: 1.5;
}
.content-features li:last-child {
    border-bottom: none;
}

.sheet-opts {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
}

.sheet-opt {
    font-weight: 400;
    flex: auto;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 12px 14px;
    background: #13111c;
    border: 1px solid #3b3554;
    border-radius: 20px;
    color: #e2e8f0;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
    max-width: 20vh;
    text-transform: none;
    margin-bottom: 0;
}
.sheet-opt input { display: none; }
.sheet-opt:has(input:checked) {
    background: var(--glow-color);
    border-color: var(--main-color);
    color: var(--main-color);
    font-weight: 600;
}

.sheet-actions {
    display: flex;
    gap: 10px;
}
.sheet-clear {
    flex: 0 0 auto;
    padding: 14px 20px;
    border: 1px solid #3b3554;
    border-radius: 12px;
    background: transparent;
    color: #94a3b8;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s;
}
.sheet-clear:hover {
    color: #e2e8f0;
    border-color: #6b6391;
}
.sheet-done {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(90deg, var(--accent-color), var(--main-color));
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
}

#age-sheet {
    background: rgba(0, 0, 0, 0.85);
}

/* Checkbox */
.checkbox-container {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    color: #e2e8f0;
    font-size: 15px;
}

.checkbox-container input {
    display: none;
}

.custom-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid #3b3554;
    border-radius: 6px;
    display: inline-block;
    position: relative;
    background: #13111c;
    transition: all 0.2s;
    flex-shrink: 0;
}

.checkbox-container input:checked + .custom-checkbox {
    background: #8be9fd;
    border-color: #8be9fd;
    box-shadow: 0 0 10px rgba(139, 233, 253, 0.5);
}

.checkbox-container input:checked + .custom-checkbox::after {
    content: "";
    position: absolute;
    inset: 2px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath fill='%230a0813' d='M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* Slider */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    background: #13111c;
    padding: 0;
    border-radius: 4px;
}

.strength-segments {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
    font-size: 11px;
    user-select: none;
    pointer-events: none;
}
.strength-segments .segment {
    opacity: 0.35;
    transition: opacity 0.3s ease, color 0.3s ease;
}
.strength-segments .segment.active {
    opacity: 1;
}
.segment-light.active { color: #8be9fd; }
.segment-medium.active { color: #bd93f9; }
.segment-strong.active { color: #ff5555; }

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-color);
    box-shadow: 0 0 14px var(--accent-color);
    cursor: pointer;
    transition: background 0.4s ease, box-shadow 0.4s ease;
}

input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-color);
    border: none;
    box-shadow: 0 0 14px var(--accent-color);
    cursor: pointer;
}

/* Button group */
.button-group {
    display: flex;
    gap: 10px;
    width: 100%;
}

.button-group button {
    flex: 1;
    padding: 15px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

/* Main button */
button#generate-btn {
    background: linear-gradient(90deg, var(--accent-color), var(--main-color));
    color: #fff;
    box-shadow: 0 4px 15px var(--glow-color);
}

button#generate-btn:active {
    transform: scale(0.97);
    box-shadow: 0 0 25px var(--accent-color);
}

/* Lucky button */
button.btn-secondary {
    background: transparent;
    color: var(--main-color);
    border: 1px solid var(--main-color) !important;
    box-shadow: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
button.btn-secondary::before {
    content: "";
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    background-color: var(--main-color);
    transition: background-color 0.4s ease;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath d='M560-160v-80h104L537-367l57-57 126 126v-102h80v240H560Zm-344 0-56-56 504-504H560v-80h240v240h-80v-104L216-160Zm151-377L160-744l56-56 207 207-56 56Z'/%3E%3C/svg%3E") center/contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath d='M560-160v-80h104L537-367l57-57 126 126v-102h80v240H560Zm-344 0-56-56 504-504H560v-80h240v240h-80v-104L216-160Zm151-377L160-744l56-56 207 207-56 56Z'/%3E%3C/svg%3E") center/contain no-repeat;
}

button.btn-secondary:active {
    background: var(--glow-color);
    transform: scale(0.97);
}

/* Result block */
.result {
    padding: 16px 20px 14px;
    background: rgba(19, 17, 28, 0.85);
    border: 1px solid var(--accent-color);
    border-radius: 14px;
    box-shadow: 0 0 20px var(--glow-color);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    z-index: 12;
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.hidden {
    display: none !important;
}

/* Empty state */
.mix-empty {
    text-align: center;
    padding: 20px 10px;
    color: #94a3b8;
}
.mix-empty span {
    font-size: 36px;
    display: block;
    margin-bottom: 10px;
}
.mix-empty p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

#mix-name {
    color: var(--main-color);
    text-shadow: 0 0 8px rgba(139, 233, 253, 0.5);
    margin: 0;
    padding-bottom: 6px;
    font-size: 20px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    line-height: 32px;
}

#mix-flavors {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    margin-bottom: 12px;
}

.flavor-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    animation: fadeInFlavor 0.3s ease forwards;
}

.flavor-item strong {
    color: var(--accent-color);
    transition: color 0.4s ease;
}

#mix-details {
    font-size: 13px;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.02);
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Button container */
.action-buttons {
    display: flex;
    gap: 10px;
    width: 100%;
}

.share-btn, .copy-btn {
    border: 1px solid var(--main-color);
    color: var(--main-color);
    flex: 1;
    padding: 10px;
    background: transparent;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.copy-btn::before {
    content: "";
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    background-color: var(--main-color);
    transition: background-color 0.4s ease;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath d='M360-240q-33 0-56.5-23.5T280-320v-480q0-33 23.5-56.5T360-880h360q33 0 56.5 23.5T800-800v480q0 33-23.5 56.5T720-240H360Zm0-80h360v-480H360v480ZM200-80q-33 0-56.5-23.5T120-160v-560h80v560h440v80H200Zm160-240v-480 480Z'/%3E%3C/svg%3E") center/contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath d='M360-240q-33 0-56.5-23.5T280-320v-480q0-33 23.5-56.5T360-880h360q33 0 56.5 23.5T800-800v480q0 33-23.5 56.5T720-240H360Zm0-80h360v-480H360v480ZM200-80q-33 0-56.5-23.5T120-160v-560h80v560h440v80H200Zm160-240v-480 480Z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.copy-btn.copied::before {
    background-color: var(--accent-color);
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath d='M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z'/%3E%3C/svg%3E") center/contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath d='M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.copy-btn.copied {
    color: var(--accent-color);
    border-color: var(--accent-color);
}
.share-btn::before {
    content: "";
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    background-color: var(--main-color);
    transition: background-color 0.4s ease;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath d='M318-120q-82 0-140-58t-58-140q0-40 15-76t43-64l134-133 56 56-134 134q-17 17-25.5 38.5T200-318q0 49 34.5 83.5T318-200q23 0 45-8.5t39-25.5l133-134 57 57-134 133q-28 28-64 43t-76 15Zm79-220-57-57 223-223 57 57-223 223Zm251-28-56-57 134-133q17-17 25-38t8-44q0-50-34-85t-84-35q-23 0-44.5 8.5T558-726L425-592l-57-56 134-134q28-28 64-43t76-15q82 0 139.5 58T839-641q0 39-14.5 75T782-502L648-368Z'/%3E%3C/svg%3E") center/contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath d='M318-120q-82 0-140-58t-58-140q0-40 15-76t43-64l134-133 56 56-134 134q-17 17-25.5 38.5T200-318q0 49 34.5 83.5T318-200q23 0 45-8.5t39-25.5l133-134 57 57-134 133q-28 28-64 43t-76 15Zm79-220-57-57 223-223 57 57-223 223Zm251-28-56-57 134-133q17-17 25-38t8-44q0-50-34-85t-84-35q-23 0-44.5 8.5T558-726L425-592l-57-56 134-134q28-28 64-43t76-15q82 0 139.5 58T839-641q0 39-14.5 75T782-502L648-368Z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.share-btn:hover, .copy-btn:hover {
    background: var(--glow-color);
}

.share-btn:active, .copy-btn:active {
    transform: scale(0.97);
}

.footer {
    text-align: center;
    font-size: 11px;
    color: #3b3554;
    padding: 6px 0 2px;
    margin-top: auto;
    letter-spacing: 0.5px;
    line-height: 1.6;
}
.footer-link {
    cursor: pointer;
    transition: color 0.2s;
}
.footer-link:hover {
    color: #6b6391;
}
a.footer-link {
    color: inherit;
    text-decoration: none;
}

@media (max-width: 600px) {
    .container { padding: 14px; }
    h1 { font-size: 20px; margin-bottom: 16px; }
    .form-group { margin-bottom: 14px; }
    label { font-size: 11px; }
    .segmented label { font-size: 13px; padding: 12px 4px; }
    .flavor-item { font-size: 14px; }
    .action-buttons { flex-direction: column; gap: 8px; }
    .button-group { flex-direction: column; gap: 8px; }
    .container { animation: none; }
    .result { padding: 14px; box-shadow: none;}
    .flavor-tip { letter-spacing: 0.2px !important; font-size: 10px !important;}
}

@media (max-width: 400px) {
    body { padding: 10px 6px; }
    .container, .result { padding: 10px; }
    h1 { font-size: 17px; }
    .segmented label { font-size: 12px; padding: 10px 3px; }
    .pref-trigger { font-size: 13px; padding: 12px 10px; min-height: 44px; }
    .flavor-item {padding: 3px;}
    .site-header { margin: -10px calc(50% - 50vw) 0; }
    .site-header h1 { font-size: 16px; }
}

@keyframes fadeInFlavor {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Keyframes for dynamic container pulse */
@keyframes neonContainerPulse {
    0% {
        border-color: rgba(255, 255, 255, 0.1);
        box-shadow: 0 0 20px var(--glow-color), inset 0 0 10px rgba(255, 255, 255, 0.02);
    }
    100% {
        border-color: var(--main-color);
        box-shadow: 0 0 35px var(--glow-color), inset 0 0 15px rgba(255, 255, 255, 0.05);
    }
}

/* Tooltip */
.flavor-tip {
    font-size: 11px;
    margin-top: 8px;
    margin-bottom: 16px;
    color: var(--main-color);
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: 0.3px;
    opacity: 0;
    transition: opacity 0.3s ease, color 0.4s ease;
    display: flex;
    align-items: flex-start;
    gap: 3px;
}
.flavor-tip::before {
    content: "";
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    margin-top: 1px;
    background-color: var(--main-color);
    transition: background-color 0.4s ease;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath d='M440-280h80v-240h-80v240Zm68.5-331.5Q520-623 520-640t-11.5-28.5Q497-680 480-680t-28.5 11.5Q440-657 440-640t11.5 28.5Q463-600 480-600t28.5-11.5ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z'/%3E%3C/svg%3E") center/contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath d='M440-280h80v-240h-80v240Zm68.5-331.5Q520-623 520-640t-11.5-28.5Q497-680 480-680t-28.5 11.5Q440-657 440-640t11.5 28.5Q463-600 480-600t28.5-11.5ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.flavor-tip.show {
    opacity: 0.85;
}

/* 404 page */
.notfound {
    padding: 24px 0;
    text-align: center;
}
.notfound-code {
    font-size: 64px;
    font-weight: 800;
    letter-spacing: 4px;
    background: linear-gradient(90deg, var(--accent-color), var(--main-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    margin-bottom: 12px;
}
.notfound-text {
    color: #94a3b8;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 24px;
}
.notfound-btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 12px;
    background: linear-gradient(90deg, var(--accent-color), var(--main-color));
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 15px var(--glow-color);
    transition: all 0.3s ease;
}
.notfound-btn:hover {
    box-shadow: 0 0 25px var(--accent-color);
}
