/* ============================================================
   common-v2.css — Unified Design System for Party Isla v2
   ============================================================ */

/* ---------- Theme Variables ---------- */
:root {
    /* Brand (same in both themes) */
    --red: #cd0e0e;
    --red-glow: rgba(205,14,14,0.4);
    --red-glow-subtle: rgba(205,14,14,0.15);

    /* Surfaces */
    --surface-body: #0a0a0a;
    --surface-primary: #111;
    --surface-secondary: #1a1a1a;
    --surface-elevated: #252525;
    --surface-input-focus: #151515;
    --switch-bg: #171a20;

    /* Text */
    --text-primary: #fff;
    --text-secondary: #ccc;
    --text-tertiary: #999;
    --text-muted: #888;
    --text-dim: #777;
    --text-faint: #666;
    --text-ghost: #555;
    --switch-text: #7f8795;

    /* Borders */
    --border-subtle: #222;
    --border-default: #333;
    --border-hover: #555;
    --border-modal: #2a2a2a;
    --border-light: rgba(255,255,255,0.1);
    --border-glass: rgba(255,255,255,0.06);
    --border-dark: rgba(0,0,0,0.2);

    /* Buttons / Interactive */
    --btn-border: #fff;
    --btn-fill: #fff;
    --btn-fill-text: #111;
    --switch-active-bg: #fff;
    --switch-active-text: #111;

    /* Overlays / Glass */
    --overlay-bg: rgba(0,0,0,0.58);
    --sticky-bg: rgba(10,10,10,0.85);
    --hover-tint: rgba(255,255,255,0.05);
    --selection-bg: rgba(255,255,255,0.15);
    --btn-glow: rgba(255,255,255,0.15);
    --glass-bg: rgba(21,21,21,0.75);
    --glass-border: rgba(255,255,255,0.06);

    /* Legacy aliases (used in HTML inline styles) */
    --accent: #fff;
    --accent-hover: #e0e0e0;
    --dark: #0a0a0a;
    --bg: #111;
    --white: #ffffff;
    --text: #fff;
    --border: 1px solid #222;

    /* Layout */
    --max-w: 1200px;
    --radius: 4px;

    /* Gray scale (reference) */
    --gray-900: #111;
    --gray-700: #444;
    --gray-600: #555;
    --gray-500: #777;
    --gray-400: #999;
    --gray-300: #ccc;
    --gray-200: #e0e0e0;
    --gray-100: #f5f5f5;
    --gray-50:  #fafafa;

    /* Timing */
    --t-fast: 0.15s ease-out;
    --t-normal: 0.2s ease-out;
    --t-slow: 0.35s ease-out;
    --transition-fast: var(--t-fast);
    --transition-normal: var(--t-normal);
    --transition-slow: var(--t-slow);
    --glass-blur: blur(12px);
    --t-bounce: cubic-bezier(0.34,1.56,0.64,1);
}

/* ---------- Light Theme ---------- */
[data-theme="light"] {
    background-color: #111;
    --surface-body: #f0f0f0;
    --surface-primary: #ffffff;
    --surface-secondary: #f5f5f5;
    --surface-elevated: #eee;
    --surface-input-focus: #fafafa;
    --switch-bg: #e5e7eb;

    --text-primary: #111;
    --text-secondary: #333;
    --text-tertiary: #666;
    --text-muted: #888;
    --text-dim: #888;
    --text-faint: #999;
    --text-ghost: #aaa;
    --switch-text: #888;

    --border-subtle: #bbb;
    --border-default: #888;
    --border-hover: #555;
    --border-modal: #bbb;
    --border-light: rgba(0,0,0,0.12);
    --border-glass: rgba(0,0,0,0.08);
    --border-dark: rgba(0,0,0,0.18);

    --btn-border: #111;
    --btn-fill: #111;
    --btn-fill-text: #fff;
    --switch-active-bg: #111;
    --switch-active-text: #fff;

    --overlay-bg: rgba(0,0,0,0.35);
    --sticky-bg: rgba(10,10,10,0.85);
    --hover-tint: rgba(0,0,0,0.04);
    --selection-bg: rgba(0,0,0,0.12);
    --btn-glow: rgba(0,0,0,0.1);
    --glass-bg: rgba(255,255,255,0.85);
    --glass-border: rgba(0,0,0,0.06);

    /* Legacy aliases */
    --accent: #111;
    --accent-hover: #333;
    --dark: #0a0a0a;
    --bg: #ffffff;
    --text: #111;
    --border: 1px solid #888;
}

/* Light theme: header, footer, sticky-nav stay dark */
[data-theme="light"] header,
[data-theme="light"] .sticky-nav,
[data-theme="light"] .sticky-nav__mobile-menu,
[data-theme="light"] footer {
    --surface-body: #0a0a0a;
    --surface-primary: #111;
    --surface-secondary: #1a1a1a;
    --surface-elevated: #252525;
    --text-primary: #fff;
    --text-secondary: #ccc;
    --text-tertiary: #999;
    --text-muted: #888;
    --text-dim: #777;
    --text-faint: #666;
    --text-ghost: #555;
    --switch-text: #7f8795;
    --border-subtle: #222;
    --border-default: #333;
    --border-hover: #555;
    --border-modal: #2a2a2a;
    --border-light: rgba(255,255,255,0.1);
    --border-glass: rgba(255,255,255,0.06);
    --border-dark: rgba(0,0,0,0.2);
    --btn-border: #fff;
    --btn-fill: #fff;
    --btn-fill-text: #111;
    --switch-active-bg: #fff;
    --switch-active-text: #111;
    --switch-bg: #171a20;
    --hover-tint: rgba(255,255,255,0.05);
    --accent: #fff;
    --accent-hover: #e0e0e0;
    --bg: #111;
    --text: #fff;
    --border: 1px solid #222;
    color: #fff;
}

[data-theme="light"] footer {
    background-color: #0a0a0a;
    border-top-color: #222;
}

/* Light theme: v1-style offset shadows on cards */
[data-theme="light"] .mobile-menu,
[data-theme="light"] .locale-modal__card {
    box-shadow: 4px 4px 0 rgba(0,0,0,0.18);
}

/* Light theme: modal shadows lighter */
[data-theme="light"] .locale-modal__card { box-shadow: 0 18px 40px rgba(0,0,0,0.15); }
[data-theme="light"] .manage-modal__card { box-shadow: 0 24px 60px rgba(0,0,0,0.15); }

/* Light theme: success/error message colors (darker for contrast) */
[data-theme="light"] .manage-modal__msg.success {
    background: rgba(22,163,74,0.08);
    border-color: rgba(22,163,74,0.25);
    color: #16a34a;
}
[data-theme="light"] .manage-modal__msg.error {
    background: rgba(205,14,14,0.06);
    border-color: rgba(205,14,14,0.2);
    color: #dc2626;
}

/* ---------- Global Resets ---------- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    outline: none;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    -webkit-touch-callout: none;
}
*:focus, *:active {
    outline: none !important;
    -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
}
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
::selection { background: var(--selection-bg); }
a, button, [role="button"], .custom-select__trigger, .custom-date__trigger,
.events-filter__field, .mobile-menu-item, .switch-option {
    -webkit-touch-callout: none;
    user-select: none;
    -webkit-user-select: none;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--surface-body);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; }

/* ---------- Logo ---------- */
.logo {
    display: inline-flex;
    flex-direction: column;
    line-height: 1;
    text-transform: uppercase;
}
.logo__top {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 24px;
    color: var(--text-primary);
    letter-spacing: 0.06em;
}
.logo__isla {
    color: var(--red);
}
.logo__bot {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 8px;
    color: var(--red);
    letter-spacing: 0.3em;
    margin-top: 4px;
}

/* ---------- Nav ---------- */
.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    flex-shrink: 0;
    position: relative;
}

.nav-links {
    display: flex;
    gap: 20px;
    font-size: 14px;
    font-weight: 700;
    align-items: center;
    text-transform: uppercase;
}

.nav-links a:not(.btn-manage) { position: relative; }
.nav-links a:not(.btn-manage)::after {
    content: ''; position: absolute; bottom: -4px; left: 0;
    width: 0; height: 2px; background: var(--red);
    transition: width 0.25s ease-out;
}
.nav-links a:not(.btn-manage):hover::after,
.nav-links a:not(.btn-manage).active::after { width: 100%; }

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent);
}

.btn-manage {
    border: 1px solid var(--btn-border);
    padding: 10px 24px;
    border-radius: 4px;
    font-weight: 700;
    color: var(--btn-border);
    transition: var(--transition-normal);
}

.nav-links .btn-manage:hover {
    background: var(--btn-fill);
    color: var(--btn-fill-text);
    transform: translateY(-2px);
}

/* ---------- Nav Locale/Currency ---------- */
.nav-currency { display: inline-flex; align-items: center; gap: 8px; }

.nav-flag {
    width: 20px;
    height: 14px;
    border-radius: 2px;
    border: none;
    background-image: url('https://flagcdn.com/w40/gb.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    display: inline-block;
    flex: 0 0 auto;
}

.locale-quick-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: auto;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.locale-quick-btn:hover { color: var(--accent); }

.locale-flag {
    width: 20px;
    height: 14px;
    border-radius: 2px;
    border: none;
    flex: 0 0 auto;
    background-color: transparent;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 100% 100%;
}

.locale-flag.lang-en { background-image: url('https://flagcdn.com/w40/gb.png'); }
.locale-flag.lang-es { background-image: url('https://flagcdn.com/w40/es.png'); }
.locale-flag.lang-de { background-image: url('https://flagcdn.com/w40/de.png'); }
.locale-flag.lang-fr { background-image: url('https://flagcdn.com/w40/fr.png'); }

/* ---------- Theme Toggle ---------- */
.theme-toggle-btn {
    width: 38px;
    height: 38px;
    border: 1px solid var(--btn-border);
    border-radius: var(--radius);
    background: transparent;
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--t-fast), color var(--t-fast);
    padding: 0;
}
@media (hover: hover) {
    .theme-toggle-btn:hover {
        color: var(--red);
        border-color: var(--red);
    }
}
@media (max-width: 768px) {
    .nav-links .theme-toggle-btn,
    .sticky-nav__links .theme-toggle-btn { display: none; }
}
.theme-toggle-btn svg {
    width: 18px;
    height: 18px;
}
.theme-toggle-btn .icon-sun { display: none; }
.theme-toggle-btn .icon-moon { display: block; }
[data-theme="light"] .theme-toggle-btn .icon-sun { display: block; }
[data-theme="light"] .theme-toggle-btn .icon-moon { display: none; }

/* ---------- Mobile Theme Pill Toggle ---------- */
.mobile-theme-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
    background: #171a20;
    border: none;
    border-radius: 4px;
    padding: 3px;
    gap: 4px;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.mobile-theme-pill__opt {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
    transition: color 0.3s ease;
}
.mobile-theme-pill__opt svg {
    width: 13px;
    height: 13px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}
.mobile-theme-pill__slider {
    position: absolute;
    top: 3px;
    bottom: 3px;
    left: 3px;
    width: calc(50% - 5px);
    background: #fff;
    border-radius: 4px;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}
/* Dark mode (default): slider on right = Dark active */
[data-theme="dark"] .mobile-theme-pill__slider,
:root:not([data-theme="light"]) .mobile-theme-pill__slider {
    left: calc(50% + 2px);
}
[data-theme="light"] .mobile-theme-pill__slider {
    left: 3px;
}
/* Active = white bg + dark text, Inactive = transparent + muted text */
.mobile-theme-pill__opt--dark { color: #111; }
.mobile-theme-pill__opt--light { color: #7f8795; }
[data-theme="light"] .mobile-theme-pill__opt--light { color: #111; }
[data-theme="light"] .mobile-theme-pill__opt--dark { color: #7f8795; }

/* ---------- Mobile Nav Buttons ---------- */
.mobile-nav-buttons {
    display: none;
    align-items: center;
    gap: 10px;
}

.mobile-notification-btn,
.mobile-menu-btn {
    background: transparent;
    border: 1px solid var(--btn-border);
    border-radius: 4px;
    padding: 10px;
    cursor: pointer;
    transition: all var(--t-slow);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-notification-btn {
    width: 44px;
    height: 44px;
    color: var(--text-primary);
}

.mobile-notification-btn.active {
    background: var(--red);
    border-color: var(--red);
}

.mobile-notification-btn svg {
    width: 20px;
    height: 20px;
}

.mobile-menu-btn {
    width: 44px;
    height: 44px;
    flex-direction: column;
    gap: 5px;
    position: relative;
}

.mobile-menu-btn span {
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    transition: all var(--t-slow);
    display: block;
}

.mobile-menu-btn.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.mobile-menu-btn.active span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }

/* ---------- Mobile Menu ---------- */
.mobile-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    width: 70vw;
    max-width: 70vw;
    min-width: 260px;
    display: none;
    flex-direction: column;
    background: var(--surface-body);
    border: 1px solid var(--btn-border);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 4px 4px 0 var(--border-dark);
    z-index: 1000;
}

.mobile-menu.open { display: flex; }

.mobile-menu-item {
    padding: 16px 20px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border-light);
    transition: background var(--t-normal);
}

.mobile-menu-item:last-child { border-bottom: none; }
.mobile-menu-item:hover { background: var(--hover-tint); }

.mobile-menu-item.active {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.mobile-menu-item.active::after {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-primary);
    flex-shrink: 0;
    margin-left: 8px;
}

.mobile-menu-item--highlighted {
    background: var(--btn-fill);
    color: var(--btn-fill-text);
    font-weight: 700;
    border-top: 1px solid var(--border-dark);
    border-bottom: 1px solid var(--border-dark);
}

.mobile-menu-item--highlighted:hover {
    background: var(--accent-hover);
}

/* -- Mobile Menu Switches -- */
.mobile-menu-section {
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.mobile-menu-section--switch {
    display: block;
    padding: 10px 16px 6px;
    border-bottom: none;
}

.mobile-menu-item + .mobile-menu-section--switch { margin-top: 8px; }
.mobile-menu-section--switch + .mobile-menu-section--switch {
    padding-top: 0;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-light);
}

.mobile-menu-switch {
    display: inline-flex;
    width: 100%;
    border: none;
    border-radius: 4px;
    overflow: hidden;
    background: var(--switch-bg);
    justify-content: flex-start;
    gap: 4px;
    padding: 3px;
}

.mobile-menu-switch-item {
    flex: 1 1 0;
    min-width: 0;
    height: 32px;
    padding: 0 8px;
    border-right: none;
    color: var(--switch-text);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border-radius: 4px;
    background: transparent;
}

.mobile-menu-switch-item.is-active {
    background: var(--switch-active-bg);
    color: var(--switch-active-text);
}

/* ---------- Sticky Nav (DISABLED) ---------- */
.sticky-nav { display: none !important; }

/* ---------- Locale Modal ---------- */
.locale-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1300;
}

.locale-modal.open { display: flex; }

.locale-modal__backdrop {
    position: absolute;
    inset: 0;
    background: var(--overlay-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.locale-modal__card {
    position: relative;
    width: min(520px, calc(100vw - 20px));
    border: 1px solid var(--border-default);
    border-radius: 4px;
    background: var(--surface-secondary);
    box-shadow: 0 18px 40px rgba(0,0,0,0.5);
    overflow: hidden;
}

.locale-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-modal);
    padding: 0 14px 0 16px;
    height: 58px;
}

.locale-modal__tabs { display: inline-flex; gap: 8px; }

.locale-modal__tab {
    height: 38px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: 4px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    background: none;
    cursor: pointer;
    transition: all var(--t-fast);
}

.locale-modal__tab.is-active {
    color: var(--text-primary);
    border-color: var(--btn-border);
    background: var(--surface-elevated);
}

.locale-modal__close {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-default);
    border-radius: 4px;
    color: var(--text-muted);
    font-size: 18px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: none;
    transition: all .15s;
}

.locale-modal__close:hover {
    background: var(--surface-elevated);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.locale-modal__body { padding: 14px 16px; }

.locale-modal__pane {
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.locale-modal__pane.is-active { display: grid; }

.locale-option {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border: 1px solid var(--border-default);
    border-radius: 4px;
    color: var(--text-dim);
    background: var(--surface-primary);
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: all var(--t-fast);
}

.locale-option:hover {
    border-color: var(--btn-border);
    color: var(--text-primary);
}

.locale-option.is-active {
    border-color: var(--btn-border);
    background: var(--btn-fill);
    color: var(--btn-fill-text);
}

.locale-modal__foot { padding: 0 16px 16px; }

.locale-modal__apply {
    width: 100%;
    height: 48px;
    border: 1px solid var(--btn-border);
    border-radius: 4px;
    background: transparent;
    color: var(--text-primary);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: background .2s, color .2s;
}

.locale-modal__apply:hover {
    background: var(--btn-fill);
    color: var(--btn-fill-text);
}

body.locale-modal-open { overflow: hidden; }

/* ---------- Manage Modal ---------- */
.manage-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1400;
}

.manage-modal.open { display: flex; }

.manage-modal__backdrop {
    position: absolute;
    inset: 0;
    background: var(--overlay-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.manage-modal__card {
    position: relative;
    width: min(440px, calc(100vw - 32px));
    border: 1px solid var(--border-default);
    border-radius: 4px;
    background: var(--surface-secondary);
    box-shadow: 0 24px 60px rgba(0,0,0,.5);
    overflow: hidden;
    animation: mm-appear .25s ease-out;
}

@keyframes mm-appear {
    from { opacity: 0; transform: translateY(16px) scale(.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.manage-modal__card.closing {
    animation: mm-disappear .2s ease-in forwards;
}

@keyframes mm-disappear {
    to { opacity: 0; transform: translateY(12px) scale(.96); }
}

.manage-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px 16px;
}

.manage-modal__head h3 {
    font-size: 17px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .02em;
    color: var(--text-primary);
}

.manage-modal__close {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-default);
    border-radius: 4px;
    color: var(--text-faint);
    font-size: 18px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: none;
    transition: all .15s;
}

.manage-modal__close:hover {
    background: var(--surface-elevated);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.manage-modal__body { padding: 0 22px 22px; }

.manage-modal__hint {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 18px;
}

.manage-modal__input-wrap {
    position: relative;
    margin-bottom: 6px;
}

.manage-modal__input-wrap input {
    width: 100%;
    height: 50px;
    border: 1px solid var(--border-default);
    border-radius: 4px;
    padding: 0 44px 0 16px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color .2s, box-shadow .2s;
    background: var(--surface-primary);
    color: var(--text-primary);
}

.manage-modal__input-wrap input:focus {
    outline: none;
    border-color: var(--btn-border);
    background: var(--surface-input-focus);
    box-shadow: 0 0 0 3px var(--border-light);
}

.manage-modal__input-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    pointer-events: none;
    opacity: 0;
    transition: opacity .2s, transform .25s ease-out, color .2s;
}

.manage-modal__input-wrap input.valid ~ .manage-modal__input-icon {
    opacity: 1;
    color: #16a34a;
    animation: icon-pop .3s ease-out;
}

.manage-modal__input-wrap input.invalid ~ .manage-modal__input-icon {
    opacity: 1;
    color: var(--red);
    animation: icon-shake .35s ease-out;
}

@keyframes icon-pop {
    0% { transform: translateY(-50%) scale(0); }
    60% { transform: translateY(-50%) scale(1.2); }
    100% { transform: translateY(-50%) scale(1); }
}

@keyframes icon-shake {
    0%, 100% { transform: translateY(-50%) translateX(0); }
    20% { transform: translateY(-50%) translateX(-4px); }
    40% { transform: translateY(-50%) translateX(4px); }
    60% { transform: translateY(-50%) translateX(-3px); }
    80% { transform: translateY(-50%) translateX(2px); }
}

.manage-modal__input-wrap input:focus ~ .manage-modal__input-icon { opacity: .6; }

.manage-modal__detect {
    font-size: 12px;
    font-weight: 600;
    min-height: 20px;
    padding: 4px 0 12px;
    color: var(--text-tertiary);
    transition: color .2s;
}

.manage-modal__detect.is-email  { color: #2563eb; }
.manage-modal__detect.is-phone  { color: #7c3aed; }
.manage-modal__detect.is-error  { color: var(--red); }

.manage-modal__search {
    width: 100%;
    height: 50px;
    border: none;
    border-radius: 4px;
    background: var(--btn-fill);
    color: var(--btn-fill-text);
    font-size: 15px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .03em;
    cursor: pointer;
    transition: all .2s;
}

.manage-modal__search:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--btn-glow);
}

.manage-modal__search:active { transform: translateY(0); }

.manage-modal__search:disabled {
    opacity: .4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.manage-modal__msg {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.55;
    text-align: center;
    display: none;
    animation: mm-appear .3s ease-out;
}

.manage-modal__msg.show { display: block; }

.manage-modal__msg.success {
    background: rgba(22,163,74,0.1);
    border: 1px solid rgba(22,163,74,0.3);
    color: #4ade80;
}

.manage-modal__msg.error {
    background: rgba(205,14,14,0.1);
    border: 1px solid rgba(205,14,14,0.3);
    color: #f87171;
}

body.manage-modal-open { overflow: hidden; }

/* ---------- Cookie Toast ---------- */
#cookie-toast {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 2100;
    max-width: 360px;
    padding: 16px 20px;
    background: var(--surface-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-default);
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.6;
    display: none;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .25s ease, transform .25s ease;
}

#cookie-toast.show { opacity: 1; transform: translateY(0); }
#cookie-toast strong { color: var(--text-primary); }

#cookie-toast-btn {
    display: inline-block;
    margin-top: 12px;
    padding: 8px 20px;
    background: transparent;
    color: var(--btn-border);
    border: 1px solid var(--btn-border);
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s, color .15s;
}

#cookie-toast-btn:hover {
    background: var(--btn-fill);
    color: var(--btn-fill-text);
}

/* ---------- Footer ---------- */
footer {
    color: var(--text-tertiary);
    padding: 60px 20px 30px;
    border-top: var(--border);
    margin-top: auto;
}

.footer-inner {
    max-width: var(--max-w);
    margin: 0 auto;
}

.footer-top {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border-subtle);
}

.footer-brand .f-logo {
    display: inline-flex;
    flex-direction: column;
    line-height: 1;
    text-transform: uppercase;
    margin-bottom: 14px;
}
.footer-brand .f-logo .logo__top {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 22px;
    color: var(--text-primary);
    letter-spacing: 0.06em;
}
.footer-brand .f-logo .logo__bot {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 8px;
    color: var(--red);
    letter-spacing: 0.3em;
    margin-top: 4px;
}

.footer-brand p {
    font-size: 13px;
    color: var(--text-faint);
    line-height: 1.6;
    max-width: 280px;
}

.footer-col h4 {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }

.footer-col a {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dim);
    transition: color .15s;
    position: relative;
    display: inline-block;
}

.footer-col a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--text-primary);
    transition: width 0.25s ease-out;
}

.footer-col a:hover { color: var(--text-primary); }
.footer-col a:hover::after { width: 100%; }

.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 4px;
}

.footer-social a {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    border: 1px solid var(--border-default);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color .15s, background .15s;
}

.footer-social a::after { display: none; }

.footer-social a:hover {
    border-color: var(--text-primary);
    background: var(--surface-secondary);
}

.footer-social svg {
    width: 16px;
    height: 16px;
    fill: var(--text-tertiary);
}

.footer-social a:hover svg { fill: var(--text-primary); }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 24px;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-bottom .copy {
    font-size: 12px;
    color: var(--text-ghost);
}

.footer-bottom-links {
    display: flex;
    gap: 24px;
}

.footer-bottom-links a {
    font-size: 12px;
    color: var(--text-ghost);
    font-weight: 600;
}

.footer-bottom-links a:hover { color: var(--text-primary); }

/* ---------- Media Queries ---------- */

/* Nav + Footer -> mobile */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .mobile-nav-buttons { display: flex; }

    .sticky-nav__links { display: none; }
    .sticky-nav__menu-btn { display: inline-flex; }
    .sticky-nav__inner { padding: 10px 14px; }

    .footer-top {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
    .footer-brand { grid-column: 1 / -1; }
    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

@media (min-width: 1240px) {
    .sticky-nav__inner { padding: 12px 0; }
}

@media (max-width: 480px) {
    footer { padding: 36px 16px 24px; }
    .footer-top {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    .footer-brand {
        grid-column: 1 / -1;
        margin-bottom: 4px;
    }
    .footer-brand .f-logo { margin-bottom: 10px; }
    .footer-brand .f-logo .logo__top { font-size: 18px; }
    .footer-brand .f-logo .logo__bot { font-size: 9px; }
    .footer-brand p { font-size: 12px; max-width: 100%; }
    .footer-col h4 { font-size: 11px; margin-bottom: 12px; }
    .footer-col li { margin-bottom: 8px; }
    .footer-col a { font-size: 12px; }
    .footer-social a { width: 32px; height: 32px; }
    .footer-social svg { width: 14px; height: 14px; }
    .footer-bottom { padding-top: 16px; }
    .footer-bottom .copy { font-size: 11px; }
    .footer-bottom-links a { font-size: 11px; }
    .footer-bottom-links { gap: 16px; }
}
