/* ===========================
   AVIATOR - COMPLETE STYLES
   =========================== */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;800&family=Roboto+Mono:wght@400;600;700&display=swap');

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg-dark: #0a0b14;
    --bg-panel: #10111e;
    --accent-green: #22c55e;
    --accent-green-dark: #16a34a;
    --accent-red: #ef4444;
    --accent-orange: #f97316;
    --accent-red-btn: #dc2626;
    --text-white: #ffffff;
    --text-muted: #8892a4;
    --text-green: #4ade80;
    --border: rgba(255,255,255,0.07);
    --header-bg: #080910;
    --logo-bar-bg: #0c0d1a;
}

html, body {
    height: 100%;
    background: var(--bg-dark);
    color: var(--text-white);
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    overflow-x: hidden;
}

/* ── TOP BAR ── */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--header-bg);
    padding: 0 16px;
    height: 46px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.top-bar-left { display: flex; align-items: center; gap: 14px; }
.top-title { font-size: 15px; font-weight: 700; }
.top-bar-right { display: flex; align-items: center; gap: 10px; }
.top-balance { font-weight: 700; font-size: 14px; }
.balance-amount { color: var(--text-green); }

.btn-deposit-top {
    background: var(--accent-green);
    color: #fff;
    text-decoration: none;
    padding: 7px 14px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
    white-space: nowrap;
}
.btn-deposit-top:hover { background: var(--accent-green-dark); }

.btn-login-top, .btn-register-top {
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
}
.btn-register-top { background: var(--accent-orange); border-color: var(--accent-orange); }

.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-white);
    font-size: 16px;
    width: 34px; height: 34px;
    border-radius: 50%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    opacity: 0.75;
    transition: all 0.2s;
}
.icon-btn:hover { background: rgba(255,255,255,0.1); opacity: 1; }

/* ── LOGO BAR ── */
.logo-bar {
    display: flex;
    align-items: center;
    background: var(--logo-bar-bg);
    padding: 0 12px;
    height: 42px;
    border-bottom: 1px solid var(--border);
    gap: 10px;
    overflow: hidden;
}
.logo-bar-left { flex-shrink: 0; }
.aviator-logo {
    font-size: 21px;
    font-weight: 900;
    color: #ef4444;
    font-style: italic;
}
.multiplier-history {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    overflow: hidden;
}
.hist-pill {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 12px;
    white-space: nowrap;
    flex-shrink: 0;
    font-family: 'Roboto Mono', monospace;
    cursor: default;
    transition: transform 0.15s;
}
.hist-pill:hover { transform: scale(1.08); }
.hist-pill.low  { background: rgba(34,197,94,0.15);  color: #4ade80; border: 1px solid rgba(34,197,94,0.3); }
.hist-pill.mid  { background: rgba(59,130,246,0.15); color: #60a5fa; border: 1px solid rgba(59,130,246,0.3); }
.hist-pill.high { background: rgba(245,158,11,0.15); color: #fbbf24; border: 1px solid rgba(245,158,11,0.3); }
.hist-pill.mega { background: rgba(168,85,247,0.2);  color: #c084fc; border: 1px solid rgba(168,85,247,0.4); }

.logo-bar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.balance-display { font-weight: 700; font-size: 14px; color: var(--text-green); white-space: nowrap; }
.icon-btn-sm {
    background: transparent; border: none; color: rgba(255,255,255,0.6);
    font-size: 14px; width: 28px; height: 28px; border-radius: 50%;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.icon-btn-sm:hover { color: #fff; background: rgba(255,255,255,0.08); }

/* ── SETTINGS PANEL ── */
.settings-overlay {
    display: none; position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,0.5);
}
.settings-overlay.active { display: block; }

.settings-panel {
    position: fixed; top: 0; right: -330px; width: 310px; height: 100vh;
    background: #14152a;
    border-left: 1px solid rgba(255,255,255,0.08);
    z-index: 210; transition: right 0.3s cubic-bezier(0.4,0,0.2,1);
    overflow-y: auto; padding-bottom: 30px;
}
.settings-panel.open { right: 0; }

.settings-user {
    display: flex; align-items: center; gap: 10px; padding: 16px 14px 12px;
}
.settings-avatar-img {
    width: 42px; height: 42px; border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.15); object-fit: cover; flex-shrink: 0;
}
.settings-username { flex: 1; font-weight: 700; font-size: 14px; }
.change-avatar-btn {
    background: transparent; border: 1px solid rgba(255,255,255,0.18);
    color: rgba(255,255,255,0.65); font-size: 10px; padding: 4px 7px;
    border-radius: 5px; cursor: pointer; white-space: nowrap; transition: all 0.2s;
}
.change-avatar-btn:hover { border-color: #fff; color: #fff; }
.settings-divider { height: 1px; background: rgba(255,255,255,0.07); margin: 3px 0; }

.settings-row {
    display: flex; align-items: center; gap: 12px; padding: 12px 16px;
    color: rgba(255,255,255,0.82); cursor: pointer; transition: background 0.18s;
    font-size: 13px; font-weight: 500;
}
.settings-row:hover { background: rgba(255,255,255,0.05); }
.settings-row i { width: 17px; color: rgba(255,255,255,0.45); font-size: 14px; text-align: center; flex-shrink: 0; }
.settings-row span { flex: 1; }
.settings-row a { color: inherit; text-decoration: none; flex: 1; }
.toggle-row { cursor: default; }
.toggle-row:hover { background: transparent; }
.logout-row { color: #ef4444; }
.logout-row i { color: #ef4444; }

.toggle-switch {
    position: relative; display: inline-block;
    width: 40px; height: 21px; cursor: pointer; flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-knob {
    position: absolute; inset: 0; background: rgba(255,255,255,0.12);
    border-radius: 21px; transition: background 0.3s;
}
.toggle-knob::before {
    content: ''; position: absolute; width: 15px; height: 15px;
    left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform 0.3s;
}
input:checked + .toggle-knob { background: var(--accent-green); }
input:checked + .toggle-knob::before { transform: translateX(19px); }

/* ── MAIN LAYOUT ── */
.main-layout {
    display: flex;
    height: calc(100vh - 88px);
    overflow: hidden;
}
.game-area {
    flex: 1; display: flex; flex-direction: column;
    overflow: hidden; background: var(--bg-dark); order: 1;
    min-width: 0;
}

/* ── LIVE BANNER ── */
.live-banner {
    display: flex; align-items: center; gap: 10px;
    background: #111220; padding: 7px 14px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.live-dot-wrap {
    display: flex; align-items: center; gap: 6px;
    font-size: 12px; font-weight: 700; color: #22c55e;
    background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.3);
    padding: 3px 9px; border-radius: 20px; white-space: nowrap; flex-shrink: 0;
}
.live-dot {
    width: 7px; height: 7px; border-radius: 50%; background: #22c55e;
    animation: pulse-dot 1.2s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%,100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.7); }
}
.live-banner-text { flex: 1; font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.8); }
.live-arrow {
    background: var(--accent-orange); border: none; color: #fff;
    width: 28px; height: 28px; border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center; font-size: 12px;
    flex-shrink: 0; transition: background 0.2s;
}
.live-arrow:hover { background: #ea6c04; }

/* ── CANVAS ── */
.game-canvas-wrap {
    flex: 1; position: relative; overflow: hidden;
    background: #080910;
    min-height: 0;
}
#aviator-canvas { width: 100%; height: 100%; display: block; }

/* ── STATE OVERLAYS ── */
.state-overlay {
    position: absolute; inset: 0;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    background: rgba(8,9,16,0.65); backdrop-filter: blur(2px);
    pointer-events: none;
}
.waiting-label {
    font-size: 16px; font-weight: 600; color: rgba(255,255,255,0.7);
    margin-bottom: 8px; letter-spacing: 1px;
}
.waiting-timer {
    font-size: 72px; font-weight: 900; color: #fff;
    font-family: 'Roboto Mono', monospace;
    animation: timer-pulse 1s ease-in-out infinite;
    text-shadow: 0 0 30px rgba(255,255,255,0.3);
}
@keyframes timer-pulse {
    0%,100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.08); opacity: 0.85; }
}

.live-multiplier {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: clamp(52px, 9vw, 100px);
    font-weight: 900; font-family: 'Roboto Mono', monospace;
    color: #fff; pointer-events: none;
    text-shadow: 0 2px 30px rgba(255,255,255,0.12);
    transition: color 0.3s;
}

.flew-away-overlay {
    position: absolute; inset: 0;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    background: rgba(6,7,14,0.75); backdrop-filter: blur(3px);
    animation: fadeInScale 0.3s ease;
}
@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}
.flew-text {
    font-size: clamp(20px, 3.5vw, 36px);
    font-weight: 800; color: #fff; letter-spacing: 3px; margin-bottom: 6px;
}
.flew-multiplier {
    font-size: clamp(56px, 10vw, 112px);
    font-weight: 900; color: #ef4444;
    font-family: 'Roboto Mono', monospace;
    text-shadow: 0 0 50px rgba(239,68,68,0.45);
    animation: crashFlash 0.5s ease;
}
@keyframes crashFlash {
    0%,100% { opacity: 1; } 25% { opacity: 0.4; } 75% { opacity: 0.7; }
}

/* ── BETTING CONTROLS ── */
.betting-controls {
    display: flex; gap: 0; background: #0d0e1c;
    border-top: 1px solid var(--border); flex-shrink: 0;
}

.bet-card {
    flex: 1; padding: 10px 14px 12px;
    border-right: 1px solid var(--border); background: #0d0e1c;
}
.bet-card:last-child { border-right: none; }

.bet-card-tabs {
    display: flex; align-items: center; gap: 4px; margin-bottom: 10px;
}
.bet-tab {
    background: rgba(255,255,255,0.07); border: none;
    color: rgba(255,255,255,0.45); padding: 5px 15px; border-radius: 20px;
    cursor: pointer; font-size: 12px; font-weight: 700;
    font-family: 'Montserrat', sans-serif; transition: all 0.2s;
}
.bet-tab.active { background: rgba(255,255,255,0.13); color: #fff; }
.bet-tab:hover:not(.active) { color: rgba(255,255,255,0.75); }

.close-card-btn {
    margin-left: auto; background: transparent; border: none;
    color: rgba(255,255,255,0.28); cursor: pointer; font-size: 13px;
    padding: 4px; transition: color 0.2s;
}
.close-card-btn:hover { color: rgba(255,255,255,0.65); }

.bet-card-body {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}

.bet-amount-row {
    display: flex; align-items: center; gap: 7px;
    background: rgba(0,0,0,0.4); border-radius: 7px;
    padding: 6px 10px; border: 1px solid rgba(255,255,255,0.07);
    flex-shrink: 0;
}
.round-btn {
    width: 26px; height: 26px; border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.07); color: #fff;
    font-size: 17px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    line-height: 1; transition: all 0.15s; flex-shrink: 0;
}
.round-btn:hover:not(:disabled) { background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.45); }
.round-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.bet-input {
    width: 58px; background: transparent; border: none;
    color: #fff; font-size: 16px; font-weight: 700;
    font-family: 'Roboto Mono', monospace; text-align: center; outline: none;
}

.quick-amounts { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.quick-btn {
    background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.09);
    color: rgba(255,255,255,0.65); padding: 5px 9px; border-radius: 6px;
    font-size: 12px; font-weight: 600; cursor: pointer;
    font-family: 'Montserrat', sans-serif; white-space: nowrap; transition: all 0.15s;
}
.quick-btn:hover:not(:disabled) { background: rgba(255,255,255,0.13); color: #fff; border-color: rgba(255,255,255,0.22); }
.quick-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* ── BET BUTTON STATES ── */
.btn-place-bet {
    border: none; border-radius: 10px; color: #fff;
    font-weight: 800; cursor: pointer;
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; line-height: 1.3;
    padding: 10px 18px; min-width: 110px;
    font-family: 'Montserrat', sans-serif;
    transition: all 0.2s; flex-shrink: 0;
    position: relative; overflow: hidden;
}
.btn-place-bet::after {
    content: ''; position: absolute; inset: 0;
    background: rgba(255,255,255,0); transition: background 0.15s;
}
.btn-place-bet:hover::after { background: rgba(255,255,255,0.08); }
.btn-place-bet:active { transform: scale(0.97); }

.btn-green {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    box-shadow: 0 4px 18px rgba(34,197,94,0.3);
}
.btn-green:hover { box-shadow: 0 6px 24px rgba(34,197,94,0.45); }

.btn-orange {
    background: linear-gradient(135deg, #f97316, #ea580c);
    box-shadow: 0 4px 18px rgba(249,115,22,0.3);
}
.btn-orange:hover { box-shadow: 0 6px 24px rgba(249,115,22,0.45); }

.btn-red {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    box-shadow: 0 4px 18px rgba(220,38,38,0.35);
    animation: cashout-pulse 0.8s ease-in-out infinite alternate;
}
@keyframes cashout-pulse {
    from { box-shadow: 0 4px 18px rgba(220,38,38,0.35); }
    to   { box-shadow: 0 6px 28px rgba(220,38,38,0.6); }
}

.btn-top-label { font-size: 15px; font-weight: 800; }
.btn-bot-label { font-size: 13px; font-weight: 700; font-family: 'Roboto Mono', monospace; opacity: 0.92; }

/* ── ERROR / TOAST ── */
.error-toast {
    position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
    padding: 10px 18px; border-radius: 10px;
    display: flex; align-items: center; gap: 8px;
    font-weight: 600; font-size: 13px; z-index: 500;
    backdrop-filter: blur(10px); white-space: nowrap;
    max-width: 90vw; overflow: hidden;
    animation: toastIn 0.25s ease;
}
@keyframes toastIn {
    from { transform: translateX(-50%) translateY(-16px); opacity: 0; }
    to   { transform: translateX(-50%) translateY(0); opacity: 1; }
}
.toast-info    { background: rgba(30,40,80,0.95); border: 1px solid rgba(96,165,250,0.4); color: #93c5fd; }
.toast-win     { background: rgba(10,50,25,0.95); border: 1px solid rgba(34,197,94,0.5); color: #86efac; }
.toast-loss    { background: rgba(50,10,10,0.95); border: 1px solid rgba(239,68,68,0.4); color: #fca5a5; }
.toast-error   { background: rgba(50,10,10,0.95); border: 1px solid rgba(239,68,68,0.4); color: #fca5a5; }

/* ── BETS PANEL ── */
.bets-panel {
    width: 365px; min-width: 300px;
    background: var(--bg-panel);
    border-left: 1px solid var(--border);
    display: flex; flex-direction: column; overflow: hidden;
    flex-shrink: 0; order: 2;
}

.bets-tabs {
    display: flex; padding: 8px 8px 0; gap: 3px;
    border-bottom: 1px solid var(--border); background: var(--bg-panel);
}
.bets-tab {
    background: transparent; border: none; color: rgba(255,255,255,0.45);
    padding: 7px 13px; border-radius: 7px 7px 0 0;
    cursor: pointer; font-size: 13px; font-weight: 700;
    font-family: 'Montserrat', sans-serif; transition: all 0.2s;
}
.bets-tab.active {
    background: rgba(255,255,255,0.07); color: #fff;
    border-bottom: 2px solid var(--accent-green);
}
.bets-tab:hover:not(.active) { color: rgba(255,255,255,0.75); }

.bets-summary {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; border-bottom: 1px solid var(--border);
}
.bets-avatars { display: flex; }
.avatar-dot {
    width: 20px; height: 20px; border-radius: 50%;
    border: 2px solid var(--bg-panel); margin-left: -5px; display: inline-block;
}
.avatar-dot:first-child { margin-left: 0; }

.bets-stats { flex: 1; }
.bets-label-row { font-size: 10px; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.bets-count-num { font-size: 16px; font-weight: 800; color: #fff; font-family: 'Roboto Mono', monospace; }

.bets-total { text-align: right; }
.total-amount { display: block; font-size: 15px; font-weight: 800; color: #fff; font-family: 'Roboto Mono', monospace; }
.total-label { font-size: 10px; color: var(--text-muted); }

.bets-table-header {
    display: grid; grid-template-columns: 1fr 80px 52px 78px;
    padding: 5px 12px; font-size: 10px; color: var(--text-muted);
    font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}

.bets-list {
    flex: 1; overflow-y: auto; padding: 2px 0;
}
.bets-list::-webkit-scrollbar { width: 3px; }
.bets-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }

.bet-row {
    display: grid; grid-template-columns: 1fr 80px 52px 78px;
    padding: 6px 12px; align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.028);
    transition: background 0.15s, opacity 0.4s;
}
.bet-row:hover { background: rgba(255,255,255,0.025); }
.bet-row.new-row { opacity: 0; }

.bet-row-player { display: flex; align-items: center; gap: 7px; min-width: 0; }
.bet-avatar {
    width: 26px; height: 26px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 800; color: #fff; flex-shrink: 0;
}
.bet-name { font-size: 12px; color: rgba(255,255,255,0.7); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bet-amount-cell { font-size: 12px; color: rgba(255,255,255,0.55); font-family: 'Roboto Mono', monospace; }
.bet-x-cell { font-size: 12px; font-weight: 700; font-family: 'Roboto Mono', monospace; text-align: center; }
.bet-x-cell.x-low  { color: #4ade80; }
.bet-x-cell.x-mid  { color: #60a5fa; }
.bet-x-cell.x-high { color: #fbbf24; }
.bet-x-cell.x-mega { color: #c084fc; }
.bet-x-cell.x-lost { color: transparent; }
.bet-win-cell { font-size: 12px; font-weight: 600; font-family: 'Roboto Mono', monospace; text-align: right; color: rgba(255,255,255,0.75); }
.bet-win-cell.lost { color: transparent; }

.provably-fair {
    padding: 7px 12px; font-size: 11px; color: var(--text-muted);
    display: flex; align-items: center; gap: 6px; border-top: 1px solid var(--border);
}
.provably-fair i { color: var(--accent-green); }
.powered { margin-left: auto; }
.powered strong { color: rgba(255,255,255,0.5); }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.09); border-radius: 2px; }

/* ── RESPONSIVE TABLET ── */
@media (max-width: 900px) {
    .bets-panel { width: 295px; min-width: 260px; }
    .flew-multiplier { font-size: 60px; }
    .flew-text { font-size: 22px; }
}

/* ── RESPONSIVE MOBILE ── */
@media (max-width: 680px) {
    .top-bar { padding: 0 10px; height: 42px; }
    .top-title { display: none; }
    .logo-bar { padding: 0 8px; }
    .balance-display { display: none; }
    .btn-deposit-top { padding: 6px 10px; font-size: 12px; }

    .main-layout {
        flex-direction: column; height: auto;
        min-height: calc(100vh - 84px); overflow: auto;
    }
    .game-area { order: 1; min-height: 380px; }
    .bets-panel {
        order: 2; width: 100%; min-width: 0;
        border-left: none; border-top: 1px solid var(--border); max-height: 350px;
    }

    .game-canvas-wrap { min-height: 200px; }
    .flew-multiplier, .live-multiplier { font-size: 46px; }
    .flew-text { font-size: 17px; }

    .betting-controls { flex-direction: column; }
    .bet-card { border-right: none; border-bottom: 1px solid var(--border); }
    .bet-card:last-child { border-bottom: none; }
    .bet-card-body { flex-wrap: wrap; gap: 7px; }
    .btn-place-bet { flex: 1; min-width: 90px; }
    .quick-amounts { flex-wrap: wrap; }
    .quick-btn { font-size: 11px; padding: 4px 7px; }

    .bets-table-header, .bet-row { grid-template-columns: 1fr 68px 48px 65px; }
    .hist-pill { font-size: 10px; padding: 2px 5px; }
}

@media (max-width: 420px) {
    .bet-input { width: 48px; font-size: 14px; }
    .round-btn { width: 23px; height: 23px; font-size: 14px; }
    .quick-amounts { gap: 3px; }
    .quick-btn { font-size: 10px; padding: 4px 5px; }
    .flew-multiplier, .live-multiplier { font-size: 36px; }
    .flew-text { font-size: 14px; }
    .waiting-timer { font-size: 52px; }
}

/* ─────────────────────────────────────────────────────────────
   HISTORY DROPDOWN
   ───────────────────────────────────────────────────────────── */

.history-toggle-btn {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
    width: 28px; height: 28px;
    border-radius: 6px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.history-toggle-btn:hover {
    background: rgba(255,255,255,0.14);
    color: #fff;
    border-color: rgba(255,255,255,0.22);
}
#history-toggle-icon {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
}

.history-dropdown {
    display: none;
    position: absolute;
    top: 88px;
    left: 0; right: 0;
    z-index: 90;
    background: var(--logo-bar-bg, #0c0d1a);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 6px 20px rgba(0,0,0,0.45);
    animation: hist-drop 0.18s cubic-bezier(0.4,0,0.2,1);
    overflow: hidden;
}
.history-dropdown.open { display: block; }

@keyframes hist-drop {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.history-dropdown-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    padding: 7px 12px;
    max-height: calc((22px + 4px) * 3 + 7px);
    overflow: hidden;
}

@media (max-width: 680px) {
    .history-dropdown { top: 84px; }
}

/* preloader styles are in preloader.css */