@font-face {
    font-family: 'CookieRun Regular';
    src: url('/Assets/CookieRun Regular.otf') format('opentype'),
         url('/Assets/CookieRunRegular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'CookieRun Bold';
    src: url('/Assets/CookieRun Bold.otf') format('opentype'),
         url('/Assets/CookieRunBold.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'CookieRun Black';
    src: url('/Assets/CookieRun Black.otf') format('opentype'),
         url('/Assets/CookieRunBlack.otf') format('opentype');
    font-weight: 900;
    font-style: normal;
}

:root {
    --bg-canopy: #110d19;
    --bg-moss: #181524;
    --card-bg: #1e192b;
    --card-bg-hover: #262038;
    --petal-light: #d0c2f7;
    --petal-main: #9d8ec7;
    --petal-deep: #5e4796;
    --petal-dark: #3b2a66;
    --blossom-pink: #d96b98;
    --leaf-sage: #7bc996;
    --pollen-gold: #f6c85f;
    --border-vine: rgba(157, 142, 199, 0.28);
    --border-bloom: rgba(208, 194, 247, 0.6);
}

*, *::before, *::after, button, input, select, textarea {
    font-family: 'CookieRun Regular', sans-serif !important;
}

h1, .game-title {
    font-family: 'CookieRun Black', 'CookieRun Bold', 'CookieRun Regular' !important;
}

h2, h3, b, strong, .btn-floral, .social-button, .lb-header, .sub-nav a, .status-badge .badge-title {
    font-family: 'CookieRun Bold', 'CookieRun Regular' !important;
}

body {
    margin: 0;
    font-family: 'CookieRun Regular' !important;
    background-color: var(--bg-canopy);
    color: #f4f0ff;
    overflow-x: hidden;
}

.game-card.inactive, .inactive {
    filter: none !important;
    pointer-events: auto !important;
    opacity: 1 !important;
}

/* === NATURE & FLORAL BACKGROUND (GPU OPTIMIZED) === */
.background-container {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100vw;
    display: flex;
    justify-content: center;
    overflow: hidden;
    background: 
        radial-gradient(circle at 15% 20%, rgba(94, 71, 150, 0.22) 0%, transparent 45%),
        radial-gradient(circle at 85% 80%, rgba(65, 110, 85, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 50% 0%, rgba(157, 142, 199, 0.18) 0%, transparent 60%),
        linear-gradient(180deg, #0f0b17 0%, #171224 55%, #12181b 100%);
    z-index: -1;
    pointer-events: none;
    contain: strict;
}

#lines {
    display: none;
}

.floral-bg-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

/* Removed CSS drop-shadow filter to eliminate modal composite lag */
.floating-petal {
    filter: drop-shadow();
    position: absolute;
    will-change: transform;
    opacity: 0.6;
}

.firefly-spore {
    position: absolute;
    border-radius: 50%;
    background: #f6c85f;
    will-change: transform, opacity;
}

/* === BANNER STYLES === */
.banner {
    background: linear-gradient(180deg, rgba(18, 13, 28, 0.96) 0%, rgba(26, 20, 40, 0.9) 100%);
    border-bottom: 1px solid var(--border-vine);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    color: white;
    padding: 10px 16px;
    text-align: center;
    font-size: 2em;
    font-weight: bold;
    position: relative;
    z-index: 100;
}

.banner-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 95%;
    margin: 0 auto;
    flex-wrap: nowrap;
}

.banner-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    white-space: nowrap;
}

/* === PETAL & FLORAL BUTTONS (UNIFORM OUTLINES, HEIGHT & HIGHLIGHTING) === */
.social-button, .btn-floral {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    height: 40px;
    padding: 0 18px;
    margin: 0;
    border-radius: 20px 6px 20px 6px;
    text-decoration: none;
    font-size: 15px;
    line-height: 1;
    font-family: inherit;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
    border: 1.5px solid rgba(226, 214, 255, 0.65);
    background: linear-gradient(135deg, #6b51ab 0%, #463278 100%);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.3), 0 4px 12px rgba(10, 7, 16, 0.6);
    cursor: pointer;
    vertical-align: middle;
    transition: transform 0.2s ease, border-radius 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}

.social-button:hover, .btn-floral:hover {
    transform: translateY(-2px);
    border-radius: 6px 20px 6px 20px;
    border-color: #ffffff !important;
    background: linear-gradient(135deg, #8267c7 0%, #584094 100%);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.45), 0 6px 16px rgba(157, 142, 199, 0.4);
}

/* Accessibility Focus Ring for Keyboard Navigation */
.social-button:focus-visible,
.btn-floral:focus-visible,
.modal-close:focus-visible,
.tag-pill:focus-visible,
.filter-btn:focus-visible,
.sub-nav a:focus-visible,
.user-profile-badge:focus-visible {
    outline: 2.5px solid #f6c85f !important;
    outline-offset: 2px !important;
}

.kofi-button, .btn-floral.blossom {
    background: linear-gradient(135deg, #d95d90 0%, #9e3668 100%);
    border: 1.5px solid rgba(255, 204, 224, 0.75);
}

.kofi-button:hover, .btn-floral.blossom:hover {
    background: linear-gradient(135deg, #eb6ea1 0%, #b54279 100%);
    border-color: #ffffff !important;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.45), 0 6px 16px rgba(217, 107, 152, 0.45);
}

.btn-floral.pollen {
    background: linear-gradient(135deg, #ffd269 0%, #e09f24 100%);
    color: #140e21;
    text-shadow: none;
    border: 1.5px solid #fff0bd;
}

.btn-floral.pollen:hover {
    background: linear-gradient(135deg, #ffde8a 0%, #f0b035 100%);
    border-color: #ffffff !important;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.6), 0 6px 16px rgba(246, 200, 95, 0.45);
}

.discord-button {
    background: linear-gradient(135deg, #5865F2 0%, #404EED 100%);
    border: 1.5px solid rgba(210, 216, 255, 0.8);
}

.discord-button:hover {
    background: linear-gradient(135deg, #6d78ff 0%, #4e5cf2 100%);
    border-color: #ffffff !important;
}

.nurture-discord-button, .mailbox-button {
    background: linear-gradient(135deg, #7458b8 0%, #4d3785 100%);
    border: 1.5px solid rgba(226, 214, 255, 0.65);
}

.nurture-discord-button:hover, .mailbox-button:hover {
    background: linear-gradient(135deg, #886bd1 0%, #5e44a1 100%);
    border-color: #ffffff !important;
}

.settings-button {
    background: linear-gradient(135deg, #4b3d6b 0%, #312747 100%);
    border: 1.5px solid rgba(226, 214, 255, 0.65);
}

.settings-button:hover {
    background: linear-gradient(135deg, #62508a 0%, #42355e 100%);
    border-color: #ffffff !important;
}

.social-button img, .social-button svg {
    height: 20px;
    width: 20px;
    object-fit: contain;
    margin-right: 8px;
    fill: white;
    flex-shrink: 0;
}

.sub-text {
    font-size: 0.85em;
    color: #ffffff;
    font-weight: bold;
    white-space: nowrap;
    line-height: 1;
}

/* User Account Badge (Explicit 15px font-size prevents inheriting .banner's 2em) */
.user-profile-badge {
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
    height: 40px;
    font-size: 15px;
    line-height: 1;
    gap: 8px;
    background: linear-gradient(135deg, #3a2e54 0%, #241c36 100%);
    border: 1.5px solid rgba(226, 214, 255, 0.65);
    padding: 0 6px 0 8px;
    border-radius: 20px 6px 20px 6px;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.25), 0 4px 10px rgba(17, 13, 25, 0.45);
    transition: transform 0.2s ease, border-radius 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.user-profile-badge:hover {
    transform: translateY(-2px);
    border-radius: 6px 20px 6px 20px;
    border-color: #ffffff !important;
    background: linear-gradient(135deg, #4f3e73 0%, #32274a 100%);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.45), 0 6px 16px rgba(157, 142, 199, 0.4);
}

.user-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1.5px solid #d0c2f7;
    object-fit: cover;
    flex-shrink: 0;
}

.user-name {
    font-size: 14px;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Compact Door Exit Icon Button */
.sign-out-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    box-sizing: border-box;
    background: rgba(217, 107, 152, 0.25);
    color: #ffd6e6;
    border: 1px solid rgba(255, 179, 209, 0.55);
    padding: 0;
    margin-left: 2px;
    border-radius: 10px 3px 10px 3px;
    text-decoration: none;
    flex-shrink: 0;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.sign-out-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    margin: 0;
}

.sign-out-btn:hover {
    background: var(--blossom-pink);
    color: #ffffff;
    border-color: #ffffff;
    transform: translateX(1px);
}

/* --- Collapsible Game Groups for Profiles --- */
.profile-game-group { margin-bottom: 12px; background: rgba(20, 16, 31, 0.6); border: 1px solid rgba(157, 142, 199, 0.25); border-radius: 12px; overflow: hidden; }
.profile-game-header { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; background: rgba(157, 142, 199, 0.1); cursor: pointer; user-select: none; }
.profile-game-items { display: none; padding: 10px; }
.profile-game-group.open .profile-game-items { display: block; }
.profile-game-group.open .toggle-arrow { transform: rotate(180deg); }
.toggle-arrow { transition: transform 0.2s ease; }

/* === ULTRA-FAST MODAL STYLES (GLOBAL - ZERO LAG) === */
.modal-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(12, 9, 20, 0.92);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.14s ease-out, visibility 0.14s ease-out;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-window {
    background: linear-gradient(165deg, #251e36 0%, #191426 100%);
    border: 1px solid var(--border-bloom);
    border-radius: 24px 8px 24px 8px;
    width: 92%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 26px;
    box-sizing: border-box;
    position: relative;
    color: white;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.75);
    transform: translateY(8px);
    transition: transform 0.14s ease-out;
    contain: content;
}

.modal-overlay.active .modal-window {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(157, 142, 199, 0.14);
    border: 1px solid var(--border-vine);
    border-radius: 12px 4px 12px 4px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--petal-light);
    font-size: 22px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.modal-close:hover {
    background: var(--blossom-pink);
    color: white;
    border-color: #ffd1e3;
}

.modal-title {
    margin: 0 0 15px 0;
    font-size: 1.7em;
    color: var(--petal-light);
    border-bottom: 1px solid var(--border-vine);
    padding-bottom: 12px;
}

/* === BOTANICAL INPUTS, MAILBOX & SETTINGS UI === */
.floral-input, .floral-textarea, .floral-select {
    width: 100%;
    padding: 11px 14px;
    border-radius: 16px 5px 16px 5px;
    border: 1px solid var(--border-vine);
    background: rgba(17, 13, 25, 0.85);
    color: #f4f0ff;
    font-family: inherit;
    font-size: 0.95em;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.floral-input:focus, .floral-textarea:focus, .floral-select:focus {
    outline: none;
    border-color: var(--petal-light);
    box-shadow: 0 0 10px rgba(157, 142, 199, 0.25);
}

.floral-mail-card {
    background: linear-gradient(135deg, rgba(38, 31, 56, 0.9) 0%, rgba(24, 19, 36, 0.95) 100%);
    border: 1px solid var(--border-vine);
    border-radius: 18px 6px 18px 6px;
    padding: 14px 16px;
    margin-bottom: 10px;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.floral-mail-card:hover {
    border-color: var(--petal-main);
}

.floral-mail-card.unread {
    border-left: 4px solid var(--blossom-pink);
    background: linear-gradient(135deg, rgba(217, 107, 152, 0.12) 0%, rgba(30, 24, 46, 0.95) 100%);
    cursor: pointer;
}

.floral-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px 3px 10px 3px;
    font-size: 0.7em;
    font-weight: bold;
    margin-left: 8px;
    vertical-align: middle;
}

.floral-setting-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(20, 16, 30, 0.75);
    border: 1px solid var(--border-vine);
    border-radius: 16px 5px 16px 5px;
    padding: 12px 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.floral-setting-card:hover {
    border-color: var(--petal-main);
}

/* Custom Floral Toggle Checkbox */
.floral-checkbox {
    appearance: none;
    width: 44px;
    height: 24px;
    background: #161221;
    border: 1px solid var(--border-vine);
    border-radius: 14px 4px 14px 4px;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.floral-checkbox::after {
    content: '✿';
    position: absolute;
    top: 2px;
    left: 4px;
    width: 18px;
    height: 18px;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #887da8;
    background: #2a233d;
    border-radius: 8px 2px 8px 2px;
    transition: all 0.2s ease;
}

.floral-checkbox:checked {
    background: linear-gradient(135deg, var(--petal-deep), var(--blossom-pink));
    border-color: var(--petal-light);
}

.floral-checkbox:checked::after {
    left: 20px;
    color: #1a1228;
    background: var(--pollen-gold);
}

/* === FLORAL LEADERBOARD STYLES (GLOBAL) === */
.leaderboard-sidebar {
    width: 290px;
    min-width: 290px;
    background: linear-gradient(180deg, rgba(32, 25, 48, 0.95) 0%, rgba(21, 17, 33, 0.95) 100%);
    border: 1px solid var(--border-vine);
    border-radius: 24px 8px 24px 8px;
    padding: 20px;
    height: fit-content;
    box-sizing: border-box;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    position: sticky;
    top: 24px;
    align-self: flex-start;
    overflow: hidden;
}

.leaderboard-sidebar::after {
    content: '';
    position: absolute;
    bottom: -25px;
    right: -25px;
    width: 110px;
    height: 110px;
    background-image: url('/Assets/nurture_icon.ico');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.06;
    transform: rotate(-15deg);
    pointer-events: none;
}

.lb-header {
    background: linear-gradient(135deg, #684ea8 0%, #9b6b9e 55%, #c9658f 100%);
    color: white;
    text-align: center;
    padding: 12px 14px;
    border-radius: 16px 5px 16px 5px;
    font-weight: bold;
    font-size: 1.05em;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.lb-header::before, .lb-header::after {
    content: '✿';
    color: var(--petal-light);
    font-size: 0.9em;
}

.lb-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(24, 19, 36, 0.9);
    padding: 9px 12px;
    border-radius: 14px 4px 14px 4px;
    margin-bottom: 9px;
    border: 1px solid rgba(157, 142, 199, 0.18);
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.lb-row:hover {
    transform: translateX(4px);
    background: rgba(43, 35, 64, 0.95);
    border-color: var(--petal-main) !important;
}

.lb-row.rank-1 {
    background: linear-gradient(90deg, rgba(246, 200, 95, 0.14) 0%, rgba(36, 28, 54, 0.9) 100%);
    border-color: rgba(246, 200, 95, 0.5);
}
.lb-row.rank-2 {
    background: linear-gradient(90deg, rgba(208, 194, 247, 0.14) 0%, rgba(32, 25, 48, 0.9) 100%);
    border-color: rgba(208, 194, 247, 0.4);
}
.lb-row.rank-3 {
    background: linear-gradient(90deg, rgba(217, 107, 152, 0.14) 0%, rgba(32, 25, 48, 0.9) 100%);
    border-color: rgba(217, 107, 152, 0.4);
}

.lb-rank-badge {
    min-width: 28px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.85em;
    color: var(--petal-light);
    background: rgba(157, 142, 199, 0.15);
    border-radius: 10px 3px 10px 3px;
    border: 1px solid rgba(157, 142, 199, 0.3);
}

.lb-row.rank-1 .lb-rank-badge {
    background: linear-gradient(135deg, #f6c85f, #d49522);
    color: #1a1228;
    border-color: #ffe6a3;
}
.lb-row.rank-2 .lb-rank-badge {
    background: linear-gradient(135deg, #e2d9ff, #9d8ec7);
    color: #1a1228;
}
.lb-row.rank-3 .lb-rank-badge {
    background: linear-gradient(135deg, #f29bb8, #c95988);
    color: #1a1228;
}

.lb-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid rgba(157, 142, 199, 0.4);
}

.lb-info { flex-grow: 1; overflow: hidden; }
.lb-name { font-size: 0.85em; font-weight: bold; color: #f4f0ff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-score {
    color: var(--leaf-sage);
    background: rgba(123, 201, 150, 0.12);
    border: 1px solid rgba(123, 201, 150, 0.3);
    padding: 2px 8px;
    border-radius: 10px 3px 10px 3px;
    font-weight: bold;
    font-size: 0.8em;
    white-space: nowrap;
}

/* === MOBILE TROPHY BUTTON & POPUP LEADERBOARD === */
.mobile-trophy-btn {
    display: none !important;
}

.lb-mobile-close {
    display: none;
}

.mobile-lb-backdrop {
    display: none;
}

/* === GPU SCROLL & HOVER OPTIMIZATIONS === */
.floating-petal, .firefly-spore {
    transform: translateZ(0);
    backface-visibility: hidden;
    filter: none !important;
}

/* === UNIFORM FORM STACK & SLEEK EMBEDDED REQUIRED BADGE === */
.modal-form-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.floral-input, .floral-textarea, .floral-select {
    margin: 0 !important;
    display: block;
    width: 100%;
}

.req-field-row {
    position: relative;
    display: block;
    width: 100%;
    margin: 0 !important;
}

.req-field-row > input,
.req-field-row > select {
    width: 100%;
    padding-right: 84px !important;
}

.req-field-row > textarea {
    width: 100%;
    padding-right: 84px !important;
}

/* Subtle embedded rose badge inside the input instead of an external error box */
.req-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    border-radius: 8px 2px 8px 2px;
    background: rgba(217, 107, 152, 0.14);
    border: 1px solid rgba(217, 107, 152, 0.38);
    color: #f7a1c4;
    font-size: 0.68em;
    font-weight: bold;
    letter-spacing: 0.4px;
    pointer-events: none;
    user-select: none;
}

/* Pin badge to the top-right corner when inside a multi-line textarea */
.req-field-row > textarea + .req-icon {
    top: 12px;
    transform: none;
}

/* Hide the harsh exclamation SVG and render clean text */
.req-icon svg {
    display: none !important;
}

.req-icon::after {
    content: 'Required';
}

/* Highlight the badge softly when the user focuses the input */
.req-field-row:focus-within .req-icon {
    background: rgba(217, 107, 152, 0.28);
    border-color: #f7a1c4;
    color: #ffffff;
}

/* === EMPHASIZED GAME LOOKUP CALLOUT BOX === */
.lookup-callout-box {
    background: linear-gradient(135deg, rgba(104, 78, 168, 0.28) 0%, rgba(246, 200, 95, 0.1) 100%);
    border: 1.5px solid #f6c85f;
    border-radius: 18px 6px 18px 6px;
    padding: 14px 16px;
    margin-bottom: 18px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.lookup-callout-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.lookup-callout-title {
    font-size: 0.9em;
    font-weight: bold;
    color: #f6c85f;
    display: flex;
    align-items: center;
    gap: 6px;
}

.lookup-badge {
    background: #f6c85f;
    color: #1a1228;
    font-size: 0.68em;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 8px 2px 8px 2px;
    text-transform: uppercase;
}

.lookup-callout-sub {
    font-size: 0.78em;
    color: #d0c2f7;
    margin-bottom: 10px;
}

/* === ANIMATED "LINK DISCORD = NO ADS FOREVER" CTA (100% LEVEL ALIGNMENT) === */
.banner {
    padding: 14px 16px 22px 16px;
}

.banner-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    white-space: nowrap;
}

.no-ads-cta-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    height: 40px;
    box-sizing: border-box;
    vertical-align: middle;
}

.no-ads-pulse-btn {
    animation: floralPulseGlow 2.4s infinite ease-in-out;
    border-color: #f6c85f !important;
}

/* Pulses glow only (no translateY shift so it stays dead-level with other buttons) */
@keyframes floralPulseGlow {
    0%, 100% {
        box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.3), 0 0 6px rgba(246, 200, 95, 0.35), 0 0 14px rgba(157, 142, 199, 0.25);
    }
    50% {
        box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.5), 0 0 14px rgba(246, 200, 95, 0.85), 0 0 24px rgba(217, 107, 152, 0.45);
    }
}

.no-ads-sub-label {
    position: absolute !important;
    top: calc(100% + 3px) !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    margin: 0 !important;
    font-size: 9px;
    line-height: 1.2;
    font-weight: 900;
    letter-spacing: 0.4px;
    color: #f6c85f;
    background: rgba(20, 15, 32, 0.96);
    border: 1px solid rgba(246, 200, 95, 0.55);
    border-radius: 8px 2px 8px 2px;
    padding: 1px 7px;
    white-space: nowrap;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    pointer-events: none;
    z-index: 10;
}

/* === NON-INTRUSIVE PRYDWEN-STYLE AD CONTAINERS === */
.right-rail-column {
    width: 290px;
    min-width: 290px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 24px;
    align-self: flex-start;
    flex-shrink: 0;
    order: 1;
}

.right-rail-column .leaderboard-sidebar:not(.mobile-open) {
    position: static !important;
    width: 100%;
    min-width: 0;
}

.nurture-ad-unit {
    position: relative;
    background: linear-gradient(160deg, rgba(34, 27, 52, 0.92) 0%, rgba(20, 16, 31, 0.96) 100%);
    border: 1px solid var(--border-vine);
    border-radius: 18px 6px 18px 6px;
    padding: 12px;
    box-sizing: border-box;
    text-align: center;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.nurture-ad-sidebar {
    width: 100%;
    min-height: 135px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.nurture-ad-bottom {
    position: fixed;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: 92%;
    max-width: 728px;
    min-height: 64px;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 36px 10px 16px;
    background: linear-gradient(90deg, rgba(25, 20, 38, 0.96) 0%, rgba(38, 30, 58, 0.96) 100%);
    border: 1px solid rgba(208, 194, 247, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}

.ad-tag-label {
    position: absolute;
    top: 6px;
    left: 10px;
    font-size: 9px;
    font-family: monospace;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #887da8;
}

.ad-close-btn {
    position: absolute;
    top: 6px;
    right: 8px;
    width: 22px;
    height: 22px;
    border-radius: 7px 2px 7px 2px;
    background: rgba(157, 142, 199, 0.15);
    border: 1px solid var(--border-vine);
    color: var(--petal-light);
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.ad-close-btn:hover {
    background: var(--blossom-pink);
    color: #fff;
}

/* === HEADER PRIMARY vs SECONDARY GROUPS === */
.banner-primary-actions,
.banner-secondary-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-menu-toggle {
    display: none;
}

.mobile-only-signout {
    display: none !important;
}

.mobile-unread-dot {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ff4d5e;
    border: 1.5px solid #181324;
    pointer-events: none;
}

/* === MOBILE GRAPHICS & CONTAINMENT === */
@media (max-width: 768px) {
    .desktop-only-signout {
        display: none !important;
    }

    .mobile-only-signout {
        display: inline-flex !important;
    }

    .mobile-menu-toggle {
        position: relative;
    }
    /* 1. Completely hide the desktop leaderboard, spacer, and sidebar ad on mobile */
    .leaderboard-spacer,
    .nurture-ad-sidebar,
    .leaderboard-sidebar:not(.mobile-open) {
        display: none !important;
    }

    /* Collapse the right-rail wrapper so it takes 0px in flex layouts on mobile */
    .right-rail-column {
        display: contents !important;
    }

    /* 2. Top Banner Row: Logo on Left, [Login + Rank + Hamburger] on Right */
    .banner {
        padding: 10px 12px !important;
        box-sizing: border-box;
        width: 100%;
    }

    .banner-row {
        display: flex;
        flex-direction: row !important;
        align-items: center;
        justify-content: space-between;
        max-width: 100%;
        width: 100%;
        position: relative;
        gap: 8px;
    }

    .banner-row img[alt="Nurture Banner"] {
        height: 44px !important;
        padding-left: 0 !important;
        display: block;
    }

    .banner-actions {
        display: flex !important;
        align-items: center;
        gap: 6px;
        position: static;
    }

    .banner-primary-actions {
        display: flex !important;
        align-items: center;
        gap: 6px;
    }

    /* Collapsible Hamburger Dropdown Panel (Only holds secondary buttons) */
    .banner-secondary-actions {
        display: none !important;
        position: absolute;
        top: calc(100% + 10px);
        right: 0;
        left: 0;
        background: linear-gradient(165deg, #251e36 0%, #171222 100%);
        border: 1.5px solid var(--border-bloom);
        border-radius: 20px 6px 20px 6px;
        padding: 14px;
        flex-direction: row !important;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 8px;
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85);
        z-index: 1000;
    }

    .banner-secondary-actions.mobile-menu-open {
        display: flex !important;
    }

    .no-ads-cta-wrap {
        flex-direction: column;
        align-items: center;
    }

    .no-ads-sub-label {
        position: static;
        transform: none;
        margin-top: 2px;
        font-size: 7px;
        padding: 1px 4px;
    }

    .social-button, .user-profile-badge {
        padding: 6px 9px;
        border-radius: 14px 4px 14px 4px;
        gap: 5px;
    }

    .social-button img, .social-button svg, .user-avatar {
        height: 16px;
        width: 16px;
        margin-right: 4px;
    }

    .user-avatar {
        margin-right: 0;
    }

    .sub-text, .user-name {
        font-size: 11px;
        max-width: 80px;
    }

    .sign-out-btn {
        width: 24px;
        height: 24px;
        padding: 0;
    }

    .sign-out-btn svg {
        width: 14px;
        height: 14px;
    }

    /* Rank (Trophy) Button sits directly to the left of the Hamburger Button */
    .mobile-trophy-btn {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        position: static !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 36px !important;
        height: 36px !important;
        border-radius: 12px 4px 12px 4px;
        background: linear-gradient(135deg, #f6c85f 0%, #c9881e 100%);
        border: 1.5px solid #ffe6a3;
        box-shadow: 0 3px 10px rgba(246, 200, 95, 0.3);
        cursor: pointer;
        flex-shrink: 0;
    }

    .mobile-trophy-btn svg {
        width: 18px !important;
        height: 18px !important;
        margin: 0 !important;
        fill: #1a1228 !important;
    }

    /* Hamburger Button on the far right */
    .mobile-menu-toggle {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border-radius: 12px 4px 12px 4px;
        background: linear-gradient(135deg, #6b51ab 0%, #463278 100%);
        border: 1.5px solid rgba(226, 214, 255, 0.65);
        color: #ffffff;
        font-size: 19px;
        cursor: pointer;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
        flex-shrink: 0;
    }

    /* 3. Popup Leaderboard Modal when Trophy is tapped */
    .leaderboard-sidebar.mobile-open {
        display: flex !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: calc(100vw - 32px) !important;
        max-width: 350px !important;
        min-width: 0 !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: 75vh !important;
        margin: 0 !important;
        padding: 44px 16px 16px 16px !important;
        box-sizing: border-box !important;
        overflow-y: auto !important;
        z-index: 10001 !important;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9) !important;
        border: 1px solid var(--border-bloom) !important;
    }

    .leaderboard-sidebar.mobile-open .lb-mobile-close {
        display: flex !important;
        position: absolute;
        top: 10px;
        right: 12px;
        width: 30px;
        height: 30px;
        align-items: center;
        justify-content: center;
        background: rgba(157, 142, 199, 0.15);
        border: 1px solid var(--border-vine);
        border-radius: 10px 3px 10px 3px;
        color: var(--petal-light);
        font-size: 20px;
        cursor: pointer;
    }

    .mobile-lb-backdrop.active {
        display: block !important;
        position: fixed !important;
        inset: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        background: rgba(11, 8, 18, 0.88) !important;
        z-index: 10000 !important;
    }
}