/* ========================================================================
   GLOBAL BASE + DARK NINJA WISHLIST THEME
   ======================================================================== */

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

:root {
    --bg-body: #020617;
    --bg-panel: rgba(15, 23, 42, 0.94);
    --bg-panel-soft: rgba(15, 23, 42, 0.88);
    --bg-hero: rgba(15, 23, 42, 0.96);
    --border-soft: rgba(148, 163, 184, 0.5);

    --accent: #38bdf8;
    --accent-soft: rgba(56, 189, 248, 0.15);
    --accent-strong: #0ea5e9;
    --accent-gold: #facc15;
    --accent-gold-soft: rgba(250, 204, 21, 0.16);
    --accent-red: #f97316;
    --accent-red-soft: rgba(248, 113, 113, 0.12);
    --accent-free: #22c55e;
    --accent-free-soft: rgba(34, 197, 94, 0.14);

    --text-main: #e5e7eb;
    --text-sub: #9ca3af;
    --text-muted: #6b7280;

    --shadow-soft: 0 24px 60px rgba(15, 23, 42, 0.85);
    --radius-xl: 22px;
    --radius-2xl: 999px;
}

html, body {
    margin: 0; padding: 0;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    min-height: 100%;
}

body { -webkit-font-smoothing: antialiased; }

/* PAGE BACKGROUND */
.page-bg {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(56, 189, 248, 0.5), transparent 55%),
        radial-gradient(circle at bottom right, rgba(244, 114, 182, 0.4), transparent 60%),
        radial-gradient(circle at center, rgba(79, 70, 229, 0.6), transparent 65%),
        #020617;
    background-attachment: fixed;
    position: relative;
    overflow-x: hidden;
}

/* floating bricks layer */
.brick-rain-layer {
    position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0;
}
.brick {
    position: absolute; top: -40px; width: 26px; height: 14px; border-radius: 4px;
    opacity: 0.07;
    box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.2), 0 16px 30px rgba(15, 23, 42, 0.9);
    animation-name: brickFall;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    transform: translate3d(0, 0, 0);
}
@keyframes brickFall {
    0% { transform: translateY(-40px) rotate3d(0, 1, 0, 0deg); opacity: 0; }
    10% { opacity: 0.12; }
    80% { opacity: 0.10; }
    100% { transform: translateY(110vh) rotate3d(0, 1, 0, 180deg); opacity: 0; }
}

/* APP SHELL */
.app-shell {
    position: relative; z-index: 1; max-width: 1120px; margin: 0 auto;
    padding: 18px 14px 32px;
}

/* ANNOUNCEMENT BANNER */
.announcement-banner {
    background: linear-gradient(to right, rgba(59, 130, 246, 0.9), rgba(147, 51, 234, 0.9));
    border-radius: 16px;
    padding: 12px 18px;
    margin-bottom: 24px;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
    border: 1px solid rgba(255,255,255,0.1);
    animation: slideDown 0.5s ease-out;
    text-align: center;
}
@keyframes slideDown { from { transform: translateY(-10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.announcement-emoji { font-size: 1.2rem; }
.announcement-text { font-weight: 600; color: #fff; font-size: 0.95rem; }

/* HEADER / HERO --------------------------------------------------------- */

.top-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 20px;
    align-items: stretch;
}

/* Left Card */
.hero-left {
    backdrop-filter: blur(16px);
    background:
        radial-gradient(circle at top left, rgba(56, 189, 248, 0.16), transparent 60%),
        linear-gradient(to bottom right, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.9));
    border-radius: 28px;
    padding: 24px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
    display: flex; flex-direction: column; justify-content: center;
}
.hero-left::before {
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(circle at top right, rgba(251, 191, 36, 0.22), transparent 55%);
    opacity: 0.9; pointer-events: none;
}
.hero-left > * { position: relative; z-index: 1; }

.osci-badge h1 {
    font-family: "Baloo 2", system-ui; font-weight: 700; margin: 0;
    font-size: clamp(1.8rem, 1.5rem + 1vw, 2.4rem);
    letter-spacing: 0.02em; color: #f9fafb;
    line-height: 1.1;
}

.lvl-tag {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.14em;
    padding: 4px 10px; border-radius: 999px;
    background: radial-gradient(circle at top, rgba(250, 204, 21, 0.3), rgba(55, 65, 81, 0.9));
    color: #fef3c7; border: 1px solid rgba(254, 249, 195, 0.75);
    margin-bottom: 8px;
}

.gamertag { margin: 6px 0 12px; color: var(--text-sub); font-size: 0.95rem; }
.gamertag span {
    font-family: "Baloo 2", system-ui; color: #f97316;
    background: radial-gradient(circle at top, #f97316, #ea580c);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

.hero-text { margin: 12px 0; color: var(--text-main); font-size: 1rem; line-height: 1.6; }
.hero-subnote { margin-top: 8px; color: var(--text-sub); font-size: 0.85rem; line-height: 1.5; }

/* Language Switcher (Inline) */
.language-switch-inline { margin: 8px 0 16px; }
.language-switch-inline form { display: flex; gap: 8px; }

.lang-btn {
    border: none; border-radius: 6px; padding: 6px 10px; font-size: 0.75rem;
    display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
    color: #cbd5e1; background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.3); transition: all 0.2s ease-out;
}
.flag-img { width: 18px; height: auto; border-radius: 2px; box-shadow: 0 1px 2px rgba(0,0,0,0.3); }
.flag-emoji { font-size: 1rem; }
.lang-btn:hover { background: rgba(56, 189, 248, 0.15); border-color: rgba(56, 189, 248, 0.5); color: #fff; }
.lang-btn--active {
    background: radial-gradient(circle at top, rgba(250, 204, 21, 0.9), rgba(245, 158, 11, 0.9));
    color: #111827; border-color: rgba(250, 204, 21, 0.95);
    box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.3); transform: translateY(-1px);
}

/* Right Hero Card */
.hero-right { display: flex; justify-content: flex-end; align-items: stretch; }
.hero-card {
    position: relative; width: 100%; border-radius: 26px; padding: 24px;
    background:
        radial-gradient(circle at top left, rgba(56, 189, 248, 0.24), transparent 55%),
        radial-gradient(circle at bottom right, rgba(129, 140, 248, 0.36), transparent 60%),
        rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(148, 163, 184, 0.7);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.95);
    display: flex; flex-direction: column; align-items: center; text-align: center;
}

/* Hero Avatar */
.hero-avatar-ring { display: flex; justify-content: center; margin: 0 0 20px; }
.hero-avatar {
    width: 130px; height: 130px; border-radius: 999px;
    border: 4px solid rgba(250, 204, 21, 0.85);
    box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.9), 0 24px 40px rgba(15, 23, 42, 0.95);
    background: #ffffff;
    position: relative; overflow: hidden;
    transform-origin: center center; will-change: transform;
}
.avatar-img { 
    position: absolute; inset: 0; width: 100%; height: 100%; 
    object-fit: contain; object-position: center bottom; 
    transition: opacity 250ms ease-out; 
}
.avatar-img--photo { opacity: 0; object-fit: cover; object-position: center; }

.hero-card-body h2 { font-family: "Baloo 2", system-ui; font-size: 1.3rem; margin: 0 0 8px; color: #f9fafb; }
.hero-message { margin: 0 0 15px; font-size: 0.95rem; color: var(--text-sub); line-height: 1.5; }

/* FLIP CLOCK (Compact 3D Custom Version) */
.flip-clock-wrapper {
    display: flex; justify-content: center; gap: 6px; margin-top: 18px;
    font-family: 'Baloo 2', sans-serif;
}
.flip-unit { display: flex; flex-direction: column; align-items: center; }

.flip-card {
    position: relative;
    width: 36px; height: 44px; /* Compact Size */
    background: #1e293b; border-radius: 6px;
    font-size: 1.4rem; font-weight: 700; line-height: 44px;
    text-align: center;
    perspective: 400px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: #38bdf8;
}

/* Common style for halves */
.flip-card .top, .flip-card .bottom,
.flip-card .top-flip, .flip-card .bottom-flip {
    position: absolute; left: 0; width: 100%; height: 50%;
    overflow: hidden;
    background: #1e293b;
    backface-visibility: hidden; -webkit-backface-visibility: hidden;
    box-sizing: border-box;
}

/* Top Half */
.flip-card .top, .flip-card .top-flip {
    top: 0;
    border-radius: 6px 6px 0 0;
    line-height: 44px; /* Centers text vertically relative to full card */
    border-bottom: 1px solid rgba(0,0,0,0.5);
    transform-origin: bottom;
}

/* Bottom Half */
.flip-card .bottom, .flip-card .bottom-flip {
    bottom: 0;
    border-radius: 0 0 6px 6px;
    line-height: 0; /* Pulls text up to match top half */
    display: block; 
    border-top: 1px solid rgba(255,255,255,0.1);
    transform-origin: top;
}

/* Animation Layers */
.top-flip { z-index: 2; animation: flip-top 0.5s ease-in forwards; }
.bottom-flip { z-index: 1; animation: flip-bottom 0.5s ease-out forwards; transform: rotateX(90deg); }

@keyframes flip-top { 100% { transform: rotateX(-90deg); } }
@keyframes flip-bottom { 100% { transform: rotateX(0deg); } }

.flip-label { font-size: 0.6rem; color: #64748b; margin-top: 5px; letter-spacing: 0.05em; font-weight: 600; font-family: 'Inter', sans-serif; }
.flip-sep { font-size: 1.4rem; font-weight: 700; color: #475569; margin-top: 4px; line-height: 1; }

/* Mobile scaling */
@media (max-width: 500px) {
    .flip-card { width: 32px; height: 40px; font-size: 1.2rem; line-height: 40px; }
    .flip-card .top, .flip-card .top-flip { line-height: 40px; }
    .flip-sep { font-size: 1.2rem; margin-top: 4px; }
}

/* PANELS / MAIN --------------------------------------------------------- */

.panel {
    backdrop-filter: blur(18px); background: var(--bg-panel);
    border-radius: var(--radius-xl); border: 1px solid var(--border-soft);
    padding: 14px 16px 16px; box-shadow: var(--shadow-soft); margin-bottom: 14px;
}
.login-main, .gifts-main { display: flex; flex-direction: column; gap: 14px; }

/* PROFILE CENTER LAYOUT */
.profile-header-center { display: flex; justify-content: center; margin-bottom: 12px; }
.profile-header-center .hero-avatar { width: 130px; height: 130px; }
.profile-info-center { display: flex; justify-content: center; gap: 8px; margin-bottom: 15px; flex-wrap: wrap; }
.profile-pill {
    background: rgba(15, 23, 42, 0.6); border: 1px solid rgba(148, 163, 184, 0.4);
    border-radius: 999px; padding: 4px 10px; font-size: 0.8rem; color: #94a3b8;
}
.profile-pill strong { color: #e2e8f0; }
.avatar-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 3rem; background: #0f172a; }
.photo-placeholder { opacity: 0; position: absolute; inset: 0; }

/* LOGIN & INFO PANELS */
.login-panel h2 { margin: 0 0 4px; font-size: 1.1rem; }
.login-hint { margin: 0 0 10px; font-size: 0.85rem; color: var(--text-sub); }
.login-form { display: flex; flex-direction: column; gap: 7px; }
.login-form label { font-size: 0.82rem; color: var(--text-sub); }
.login-form input {
    border-radius: 999px; border: 1px solid rgba(148, 163, 184, 0.7);
    background: rgba(15, 23, 42, 0.9); color: #e5e7eb; padding: 7px 12px;
    font-size: 0.92rem; outline: none;
    transition: border-color 150ms ease-out, box-shadow 150ms ease-out, background 150ms ease-out;
}
.login-form input:focus {
    border-color: var(--accent-strong); box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.4);
    background: rgba(15, 23, 42, 0.98);
}
.error-banner {
    background: var(--accent-red-soft); border-radius: 999px; padding: 6px 10px;
    font-size: 0.82rem; color: #fed7aa; border: 1px solid rgba(248, 113, 113, 0.7);
}
.info-panel h3 { margin: 0 0 8px; font-size: 0.96rem; }
.steps-list { list-style: none; margin: 0; padding: 0; font-size: 0.83rem; color: var(--text-sub); }
.steps-list li { margin-bottom: 4px; }

/* BUTTONS */
.btn {
    border-radius: 999px; border: none; padding: 7px 14px; font-size: 0.86rem;
    font-weight: 500; cursor: pointer; display: inline-flex; align-items: center;
    justify-content: center; gap: 6px; transition: transform 120ms ease-out; white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.98); }
.primary-btn { background: linear-gradient(to right, #38bdf8, #0ea5e9); color: #0b1120; box-shadow: 0 15px 30px rgba(56, 189, 248, 0.38); }
.primary-btn:hover { background: linear-gradient(to right, #0ea5e9, #22c55e); }
.secondary-btn { background: rgba(56, 189, 248, 0.12); color: #e5e7eb; border: 1px solid rgba(56, 189, 248, 0.5); }
.ghost-btn { background: transparent; color: #e5e7eb; border: 1px solid rgba(148, 163, 184, 0.6); }
.ghost-btn:hover { background: rgba(15, 23, 42, 0.9); }
.disabled-btn { background: rgba(31, 41, 55, 0.75); color: rgba(148, 163, 184, 0.9); cursor: default; border: 1px dashed rgba(148, 163, 184, 0.6); box-shadow: none; }

/* FILTERS & SEARCH */
.filters-panel { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; justify-content: space-between; }
.filters-left h2 { margin: 0 0 4px; font-size: 1.02rem; }
.filters-left p { margin: 0; font-size: 0.84rem; color: var(--text-sub); }
.filters-right { display: flex; flex-direction: column; gap: 8px; min-width: 220px; }
.search-group { display: flex; flex-direction: column; gap: 3px; }
.search-group label { font-size: 0.78rem; color: var(--text-sub); }
.search-input-wrap { position: relative; }
.search-input-wrap input {
    width: 100%; border-radius: 999px; border: 1px solid rgba(148, 163, 184, 0.7);
    background: rgba(15, 23, 42, 0.9); color: #e5e7eb; padding: 6px 12px 6px 26px;
    font-size: 0.86rem; outline: none;
}
.search-input-wrap input:focus { border-color: var(--accent-strong); box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.4); }
.search-icon { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); font-size: 0.78rem; pointer-events: none; }

/* TOGGLES */
.toggle-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; color: var(--text-sub); }
.toggle input { display: none; }
.toggle-slider {
    width: 30px; height: 16px; border-radius: 999px; background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(148, 163, 184, 0.7); position: relative;
    transition: background 150ms ease-out, border-color 150ms ease-out;
}
.toggle-slider::after {
    content: ""; position: absolute; top: 1px; left: 2px; width: 11px; height: 11px;
    border-radius: 999px; background: #9ca3af;
    transition: transform 150ms ease-out, background 150ms ease-out;
}
.toggle input:checked + .toggle-slider { background: rgba(34, 197, 94, 0.15); border-color: rgba(34, 197, 94, 0.7); }
.toggle input:checked + .toggle-slider::after { transform: translateX(11px); background: #22c55e; }
.toggle--disabled { opacity: 0.45; }

/* GIFT GRID */
.gifts-panel { padding-top: 12px; }
.gift-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.gift-card {
    position: relative; border-radius: 18px; overflow: hidden;
    background: radial-gradient(circle at top left, rgba(15, 23, 42, 1), rgba(15, 23, 42, 0.94));
    border: 1px solid rgba(51, 65, 85, 0.9);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.94);
    display: flex; flex-direction: column; transform-origin: center;
    animation: cardIn 320ms cubic-bezier(0.18, 0.89, 0.32, 1.28) both;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(6px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
.gift-card--free { box-shadow: 0 18px 40px rgba(15, 23, 42, 0.98), 0 0 0 1px rgba(22, 163, 74, 0.3); }
.gift-card--reserved { background: radial-gradient(circle at top, rgba(15, 23, 42, 1), rgba(15, 23, 42, 0.98)); }
.gift-card--mine { border-color: rgba(250, 204, 21, 0.9); box-shadow: 0 18px 40px rgba(15, 23, 42, 0.98), 0 0 0 1px rgba(250, 204, 21, 0.4); }
.gift-image-wrap { position: relative; width: 100%; padding-top: 66%; overflow: hidden; cursor: pointer; }
.gift-image-wrap img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 200ms ease-out; }
.gift-image-wrap:hover img { transform: scale(1.03); }
.gift-rarity-bar { position: absolute; inset: 0; background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.28), transparent 50%); mix-blend-mode: screen; pointer-events: none; }

/* Ribbons */
.ribbon {
    position: absolute; top: 10px; left: 10px; padding: 4px 9px; font-size: 0.7rem;
    border-radius: 999px; backdrop-filter: blur(8px); display: inline-flex; align-items: center;
    gap: 4px; box-shadow: 0 10px 20px rgba(15, 23, 42, 0.9);
}
.ribbon-free { background: linear-gradient(to right, rgba(34, 197, 94, 0.9), rgba(22, 163, 74, 0.9)); color: #052e16; }
.ribbon-mine { background: linear-gradient(to right, rgba(250, 204, 21, 0.96), rgba(245, 158, 11, 0.94)); color: #451a03; }
.ribbon-taken { background: linear-gradient(to right, rgba(239, 68, 68, 0.96), rgba(220, 38, 38, 0.96)); color: #f9fafb; }

/* Gift Body */
.gift-body { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 6px; }
.gift-header h3 { margin: 0; font-size: 0.92rem; }
.gift-header .set-id { margin: 0; font-size: 0.78rem; color: var(--text-muted); }
.price { margin: 0; font-size: 0.8rem; color: var(--text-sub); }
.status-line { margin: 0; font-size: 0.76rem; color: var(--text-sub); }
.gift-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }

/* PROFILE & EMOJI PANELS */
.profile-panel h3, .emoji-panel h3 { margin: 0 0 8px; font-size: 0.96rem; }
.profile-message label { display: block; font-size: 0.8rem; color: var(--text-sub); margin-bottom: 3px; }
.profile-message textarea {
    width: 100%; min-height: 60px; border-radius: 12px; border: 1px solid rgba(148, 163, 184, 0.7);
    background: rgba(15, 23, 42, 0.9); color: #e5e7eb; padding: 6px 8px; font-size: 0.84rem;
    resize: vertical; outline: none;
}
.profile-message textarea:focus { border-color: var(--accent-strong); box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.4); }
.profile-message .btn { margin-top: 6px; }
.emoji-subtitle, .emoji-hint { margin: 0; font-size: 0.8rem; color: var(--text-sub); }
.emoji-hint { margin-bottom: 6px; }
.emoji-palette { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.emoji-btn {
    border-radius: 999px; border: 1px solid rgba(148, 163, 184, 0.7); background: rgba(15, 23, 42, 0.96);
    color: #e5e7eb; padding: 4px 7px; cursor: pointer; font-size: 1rem;
    transition: transform 80ms ease-out, box-shadow 80ms ease-out, background 80ms ease-out;
}
.emoji-btn:hover { transform: translateY(-1px) scale(1.03); background: rgba(30, 64, 175, 0.7); box-shadow: 0 10px 18px rgba(15, 23, 42, 0.9); }
.emoji-wall-cloud { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.emoji-cloud-item { font-size: 0.95rem; opacity: 0.9; }
.emoji-float { position: absolute; font-size: 1.8rem; animation: emojiFloat 2.2s ease-out forwards; }
@keyframes emojiFloat { 0% { transform: translateY(0) scale(1); opacity: 1; } 100% { transform: translateY(-28px) scale(1.3); opacity: 0; } }

/* LOGOUT & TOAST & MODAL & HELPER */
.logout-form { text-align: center; margin-top: 2px; }
.link-logout { border: none; background: none; color: rgba(148, 163, 184, 0.9); font-size: 0.78rem; cursor: pointer; text-decoration: none; }
.link-logout:hover { color: #e5e7eb; }
.toast {
    position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%) translateY(120%);
    background: rgba(15, 23, 42, 0.94); border-radius: 999px; border: 1px solid rgba(148, 163, 184, 0.7);
    padding: 6px 12px; font-size: 0.8rem; color: #e5e7eb; box-shadow: 0 16px 40px rgba(15, 23, 42, 0.9);
    opacity: 0; transition: opacity 180ms ease-out, transform 180ms ease-out; z-index: 40;
}
.toast--visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* MODAL - VERTICAL PORTRAIT STYLE */
.modal-backdrop {
    position: fixed; inset: 0; background: radial-gradient(circle at top, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.97));
    display: flex; align-items: center; justify-content: center; z-index: 30; padding: 16px;
}
.modal {
    max-width: 320px; /* Narrower width for portrait look */
    width: 90%; 
    background: rgba(15, 23, 42, 0.98); border-radius: 24px;
    padding: 24px 20px; 
    border: 1px solid rgba(148, 163, 184, 0.9); 
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.98);
    position: relative;
    text-align: center; /* Center everything */
}
.modal h2 { margin: 0 0 10px; font-size: 1.1rem; }
.modal-body-text { margin: 0 0 15px; font-size: 0.9rem; color: var(--text-sub); }

/* Stack Preview Vertically */
.modal-gift-preview { display: flex; flex-direction: column; gap: 15px; margin: 10px 0 20px; }
.modal-gift-image-wrap { 
    width: 100%; height: 200px; /* Taller image area */
    border-radius: 16px; overflow: hidden; background: #fff; /* White bg for sets */
    display: flex; align-items: center; justify-content: center;
    border: 1px solid #334155;
}
.modal-gift-image-wrap img { width: auto; height: 100%; max-width: 100%; object-fit: contain; padding: 10px; }
.modal-gift-name { margin: 5px 0; font-size: 1rem; font-weight: 700; }
.modal-gift-id { margin: 0; font-size: 0.9rem; color: var(--text-muted); font-family: monospace; }

.modal-note { margin: 10px 0 15px; font-size: 0.85rem; color: var(--text-sub); line-height: 1.4; }
.modal-ok-btn { width: 100%; }
.modal-close {
    position: absolute; right: 15px; top: 15px; border-radius: 50%; width: 30px; height: 30px;
    border: none; background: rgba(255, 255, 255, 0.1); color: #fff; cursor: pointer; font-size: 1rem;
    display: flex; align-items: center; justify-content: center; transition: background 0.2s;
}
.modal-close:hover { background: rgba(255, 255, 255, 0.2); }

/* NINJA HELPER */
.ninja-helper {
    position: fixed; right: 12px; bottom: 55px; display: flex; align-items: center; gap: 5px;
    background: rgba(15, 23, 42, 0.96); border-radius: 999px; border: 1px solid rgba(148, 163, 184, 0.8);
    padding: 4px 8px 4px 4px; box-shadow: 0 14px 40px rgba(15, 23, 42, 0.9);
    transform: translateY(120%); opacity: 0; transition: transform 220ms ease-out, opacity 220ms ease-out;
    cursor: pointer; z-index: 25;
}
.ninja-helper--visible { transform: translateY(0); opacity: 1; }
.ninja-helper-avatar {
    width: 22px; height: 22px; border-radius: 999px; display: flex; align-items: center; justify-content: center;
    background: radial-gradient(circle at top, rgba(56, 189, 248, 0.9), rgba(15, 23, 42, 1)); font-size: 1rem;
}
.ninja-helper-bubble { font-size: 0.76rem; color: var(--text-sub); }

/* MUSIC INDICATOR (NEW TOP POSITION) */
.music-indicator {
    position: fixed;
    top: 20px; right: 20px;
    z-index: 2000; 
    display: flex; align-items: center; gap: 8px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(56, 189, 248, 0.3);
    padding: 8px 12px; border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    transition: all 0.2s; color: #e2e8f0; font-size: 0.85rem;
}
.music-indicator:hover { background: rgba(56, 189, 248, 0.15); border-color: #38bdf8; }
.music-icon { font-size: 1.1rem; }


/* RESPONSIVE ORDER */
@media (max-width: 900px) {
    .top-hero { grid-template-columns: minmax(0, 1fr); }
    .hero-card { padding-bottom: 12px; }
    .app-shell { padding: 16px 12px 30px; }
}
@media (max-width: 640px) {
    .panel { padding: 12px 12px 14px; }
    .filters-panel { flex-direction: column; align-items: flex-start; }
    .filters-right { width: 100%; }
    .gift-grid { grid-template-columns: minmax(0, 1fr); }
    .hero-left, .hero-card { border-radius: 22px; }
    .announcement-banner { flex-direction: column; text-align: center; }
    .flip-card { width: 34px; height: 42px; font-size: 1.2rem; }
    .flip-card .top, .flip-card .top-flip { line-height: 42px; }
    .flip-sep { font-size: 1.2rem; margin-top: 6px; }
}
@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ========================================================================
   LIGHT NINJA DOJO THEME (admin.php)
   ======================================================================== */
body.admin-page {
    background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.08), transparent 55%),
                radial-gradient(circle at bottom right, rgba(56, 189, 248, 0.08), transparent 60%), #e5e7eb;
    color: #111827;
}
.admin-page .admin-wrapper { max-width: 1120px; margin: 32px auto 40px; background: #f9fafb; border-radius: 24px; padding: 24px 24px 32px; box-shadow: 0 22px 45px rgba(15, 23, 42, 0.22); color: #111827; }
.admin-page .admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.admin-page .admin-header h2 { margin: 0; font-size: 1.6rem; color: #0f172a; }
.admin-page .admin-header p { margin: 4px 0 0; font-size: 0.9rem; color: #6b7280; }
.admin-page .admin-header a { text-decoration: none; font-size: 0.9rem; color: #2563eb; }
.admin-page .admin-section { background: #ffffff; color: #111827; padding: 18px 20px; border-radius: 18px; margin-bottom: 20px; border: 1px solid rgba(148, 163, 184, 0.35); box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08); }
.admin-page .admin-section h3 { margin: 0 0 10px; font-size: 1.1rem; color: #0f172a; }
.admin-page input[type="text"], .admin-page input[type="password"], .admin-page input[type="number"], .admin-page select, .admin-page textarea { width: 100%; padding: 7px 10px; border-radius: 10px; border: 1px solid #d1d5db; background: #ffffff; color: #111827; font-size: 0.9rem; outline: none; }
.admin-page input:focus { border-color: #3b82f6; box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2); }
.admin-page .btn-ninja { background: linear-gradient(to right, #2563eb, #0ea5e9); border-radius: 999px; border: none; color: #ffffff; padding: 8px 16px; cursor: pointer; font-weight: 600; font-size: 0.9rem; }
.admin-page .btn-reserve { background: #111827; color: #ffffff; border-radius: 999px; padding: 6px 12px; font-size: 0.8rem; cursor: pointer; font-weight: 500; border: none; }
.admin-page .btn-undo { background: #6b7280; color: #ffffff; border-radius: 999px; padding: 6px 12px; font-size: 0.8rem; cursor: pointer; font-weight: 500; border: none; }
.admin-page .btn-delete { background: #dc2626; color: #ffffff; border-radius: 999px; padding: 6px 12px; font-size: 0.8rem; cursor: pointer; border: none; }
.admin-page .admin-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.admin-page .admin-table th, .admin-page .admin-table td { border-bottom: 1px solid #e5e7eb; padding: 7px 8px; font-size: 0.88rem; color: #111827; }
.admin-page .admin-table th { background: #f9fafb; text-align: left; font-weight: 600; }
.admin-page details { background: #f9fafb; border-radius: 14px; border: 1px solid #e5e7eb; padding: 10px 12px; }
.admin-page details[open] { background: #ffffff; }
.admin-page .inline-form { display: inline; }
@media (max-width: 900px) { .admin-page .admin-wrapper { margin: 16px 10px 28px; padding: 18px 16px 26px; } .admin-page .admin-header { flex-direction: column; align-items: flex-start; gap: 6px; } }
@media (max-width: 640px) { .admin-page .admin-section { padding: 14px 12px; } .admin-page .admin-table th, .admin-page .admin-table td { font-size: 0.8rem; padding: 5px 6px; } }