/* ═══════════════════════════════════════════════════════════════════════════
   nicolous260 — main stylesheet
   Design tokens → base → layout → components → animations
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Design tokens ──────────────────────────────────────────────────────── */
:root {
    --bg:              #14161b;
    --nav-bg:          #1d2026;
    --card-bg:         #1d2026;
    --accent:          #3b82f6;
    --accent-soft:     rgba(59,130,246,0.18);
    --accent-ink:      #ffffff;
    --text-main:       #eceef2;
    --text-sub:        #8b92a1;
    --border:          #2d313b;
    --search-bg:       #262a33;
    --btn-audio-bg:    #1d2026;
    --btn-audio-txt:   #eceef2;
    --btn-video-bg:    #3b82f6;
    --btn-video-txt:   #ffffff;
    --modal-bg:        rgba(0,0,0,0.85);
    --progress-fill:   #3b82f6;
    --progress-track:  #14161b;
    --drawer-bg:       #161a21;
    --toast-bg:        #1d2026;
    --toast-txt:       #eceef2;
    --success:         #36d1a4;
    --error:           #ff6b5b;
    --error-soft:      rgba(255,107,91,0.14);
    --warning:         #fbbf24;

    --shimmer:         rgba(255,255,255,0.06);
    --shimmer-strong:  rgba(255,255,255,0.10);

    --radius-card:     12px;
    --radius-btn:      8px;
    --radius-pill:     9999px;

    --transition-fast: 0.12s ease;
    --transition-med:  0.20s ease;
    --transition-slow: 0.30s ease;
}

[data-theme="light"] {
    --bg:              #f4f6fb;
    --nav-bg:          #ffffff;
    --card-bg:         #ffffff;
    --accent:          #2563eb;
    --accent-soft:     rgba(37,99,235,0.12);
    --text-main:       #0f1117;
    --text-sub:        #5b6271;
    --border:          #dde1ea;
    --search-bg:       #eef0f5;
    --btn-audio-bg:    #eef0f5;
    --btn-audio-txt:   #0f1117;
    --btn-video-bg:    #2563eb;
    --btn-video-txt:   #ffffff;
    --modal-bg:        rgba(0,0,0,0.45);
    --progress-fill:   #2563eb;
    --progress-track:  #eef0f5;
    --drawer-bg:       #f4f6fb;
    --toast-bg:        #1d2026;
    --toast-txt:       #eceef2;
    --success:         #059669;
    --error:           #ef4444;
    --error-soft:      rgba(239,68,68,0.10);

    --shimmer:         rgba(0,0,0,0.04);
    --shimmer-strong:  rgba(0,0,0,0.08);
}

/* ── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    transition:
        background-color var(--transition-med),
        color            var(--transition-med),
        border-color     var(--transition-med);
    cursor: default;
    user-select: none;
    -webkit-user-select: none;
}

.search-input,
.search-input * {
    cursor: text !important;
    user-select: text !important;
    -webkit-user-select: text !important;
}

.btn,
.back-btn,
.thumbnail-wrapper,
.quality-item,
.history-item,
.history-item *,
.action-icon-btn span {
    cursor: pointer !important;
}

/* ── Base ───────────────────────────────────────────────────────────────── */
body {
    font-family: Roboto, Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    padding-bottom: 60px;
}

.material-symbols-rounded {
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    display: inline-block;
    line-height: 1;
    width: 24px;
    height: 24px;
    text-align: center;
    flex-shrink: 0;
}

kbd {
    display: inline-block;
    padding: 1px 5px;
    font-size: 11px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: monospace;
}

/* ── Nav ────────────────────────────────────────────────────────────────── */
nav {
    background: color-mix(in srgb, var(--nav-bg) 85%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0 16px;
    height: 56px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border);
}

.nav-wrapper {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -0.8px;
    display: flex;
    align-items: center;
    background: linear-gradient(to right, var(--text-main), rgba(255,255,255,0.80));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--text-main);
}
[data-theme="light"] .brand {
    background: linear-gradient(to right, #0f0f0f, #444);
    -webkit-background-clip: text;
}

.brand span {
    -webkit-text-fill-color: initial;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    color: #fff;
    padding: 3px 7px;
    border-radius: 6px;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin-left: 6px;
    text-transform: uppercase;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.action-icon-btn {
    background: none;
    border: none;
    color: var(--text-main);
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}
.action-icon-btn:active {
    background: var(--search-bg);
}

/* ── Search overlay ─────────────────────────────────────────────────────── */
.search-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--nav-bg);
    display: none;
    align-items: center;
    padding: 0 12px;
    gap: 8px;
}
nav.search-active .search-overlay { display: flex; }
nav.search-active .nav-wrapper     { display: none;  }

.back-btn {
    background: none;
    border: none;
    color: var(--text-main);
    padding: 8px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.inputs-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-field-wrapper {
    display: flex;
    align-items: center;
    background: var(--search-bg);
    border-radius: var(--radius-pill);
    padding: 0 12px;
    height: 38px;
    gap: 8px;
}
.input-field-wrapper:focus-within {
    box-shadow: 0 0 0 2px rgba(255,255,255,0.15);
}
[data-theme="light"] .input-field-wrapper:focus-within {
    box-shadow: 0 0 0 2px rgba(0,0,0,0.12);
}

.search-input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    font-size: 14px;
    color: var(--text-main);
}
.search-input::placeholder { color: var(--text-sub); }

.clear-btn {
    background: none;
    border: none;
    color: var(--text-sub);
    display: flex;
    align-items: center;
    padding: 2px;
    flex-shrink: 0;
}


/* ── Main content / grid ────────────────────────────────────────────────── */
.main-content {
    padding: 16px;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-sub);
    padding: 80px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* ── Loading meter (search) ─────────────────────────────────────────────── */
/* A small "VU meter" of bouncing bars shown while search results load. */
.search-loading {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 80px 0;
    color: var(--text-sub);
    font-size: 14px;
}

.loading-meter {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 28px;
}
.loading-meter.loading-meter--sm { height: 18px; }

.loading-meter span {
    display: block;
    width: 5px;
    border-radius: 2px;
    background: var(--accent);
    animation: meter-bounce 1s ease-in-out infinite;
    opacity: 0.85;
}

.loading-meter span:nth-child(1)  { height: 30%;  animation-delay: 0s;    }
.loading-meter span:nth-child(2)  { height: 70%;  animation-delay: 0.05s; }
.loading-meter span:nth-child(3)  { height: 45%;  animation-delay: 0.1s;  }
.loading-meter span:nth-child(4)  { height: 90%;  animation-delay: 0.15s; }
.loading-meter span:nth-child(5)  { height: 60%;  animation-delay: 0.2s;  }
.loading-meter span:nth-child(6)  { height: 100%; animation-delay: 0.25s; }
.loading-meter span:nth-child(7)  { height: 55%;  animation-delay: 0.3s;  }
.loading-meter span:nth-child(8)  { height: 80%;  animation-delay: 0.35s; }
.loading-meter span:nth-child(9)  { height: 40%;  animation-delay: 0.4s;  }
.loading-meter span:nth-child(10) { height: 65%;  animation-delay: 0.45s; }

@keyframes meter-bounce {
    0%, 100% { transform: scaleY(0.4); opacity: 0.5; }
    50%      { transform: scaleY(1);   opacity: 1;   }
}

/* ── Video card ─────────────────────────────────────────────────────────── */
@keyframes cardIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0);    }
}

.video-card {
    background: var(--card-bg);
    border-radius: var(--radius-card);
    overflow: hidden;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    animation: cardIn 0.28s ease both;
}

/* thumbnail */
.thumbnail-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    overflow: hidden;
    background: var(--search-bg);
    cursor: pointer !important;
}
.thumbnail-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, var(--shimmer-strong) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    z-index: 1;
}
.thumbnail-wrapper.loaded::before { display: none; }

@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position:  200% 0; }
}

.thumbnail-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity var(--transition-med);
    z-index: 2;
}
.thumbnail-img.img-loaded { opacity: 1; }

.thumbnail-wrapper video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
}

/* duration badge */
.duration-badge {
    position: absolute;
    bottom: 6px;
    right: 8px;
    background: rgba(0,0,0,0.80);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 4px;
    letter-spacing: 0.3px;
    z-index: 4;
    pointer-events: none;
    backdrop-filter: blur(4px);
}

.play-overlay-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #fff;
    border-radius: 50%;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    opacity: 0;
    transition: opacity var(--transition-med), transform var(--transition-med), background var(--transition-med);
    z-index: 3;
}
.thumbnail-img.img-loaded ~ .play-overlay-icon { opacity: 0.85; }
.thumbnail-wrapper:hover .play-overlay-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.08);
    background: rgba(59,130,246,0.80);
}

/* card info */
.video-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}

.video-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text-main);
}

.video-meta {
    font-size: 12px;
    color: var(--text-sub);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* action row */
.action-row {
    display: flex;
    gap: 8px;
    position: relative;
}

.btn-container {
    flex-grow: 1;
    position: relative;
}

.btn {
    width: 100%;
    padding: 11px 10px;
    font-size: 12px;
    font-weight: 700;
    border: none;
    border-radius: var(--radius-btn);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    z-index: 1;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}
.btn:not(:disabled):active {
    transform: scale(0.96);
    opacity: 0.85;
}
.btn .progress-bar-fill {
    position: absolute;
    top: 0; left: 0;
    height: 100%;
    width: 0%;
    background-color: var(--progress-fill);
    background-image: repeating-linear-gradient(
        to right,
        transparent 0,
        transparent 6px,
        rgba(0,0,0,0.15) 6px,
        rgba(0,0,0,0.15) 7px
    );
    z-index: -1;
    transition: width 0.25s ease, background-color 0.3s ease;
}
[data-theme="light"] .btn .progress-bar-fill {
    background-image: repeating-linear-gradient(
        to right,
        transparent 0,
        transparent 6px,
        rgba(255,255,255,0.45) 6px,
        rgba(255,255,255,0.45) 7px
    );
}

/* Indeterminate scanning bar shown before the first real percent arrives */
.btn .progress-bar-fill.indeterminate {
    width: 100% !important;
    background-image: linear-gradient(
        90deg,
        transparent 0%,
        var(--progress-fill) 50%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: progress-scan 1.2s linear infinite;
    transition: none;
}
@keyframes progress-scan {
    0%   { background-position: -100% 0; }
    100% { background-position:  100% 0; }
}
.btn .material-symbols-rounded {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.btn-download { background-color: var(--btn-video-bg); color: var(--btn-video-txt); }
.btn-audio    { background-color: var(--btn-audio-bg); color: var(--btn-audio-txt); border: 1px solid var(--border); }
.btn:disabled { opacity: 0.55; }

/* copy button */
.copy-btn {
    background: var(--btn-audio-bg);
    border: 1px solid var(--border);
    color: var(--btn-audio-txt);
    border-radius: var(--radius-btn);
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.copy-btn:active { opacity: 0.6; transform: scale(0.95); }

/* ── Download progress panel (ytgrab-style tape counter) ─────────────────── */
.dl-progress-panel {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-top: 1px solid var(--border);
    display: none;
}
.dl-progress-panel.visible { display: flex; }

.dl-progress-track {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    background: var(--progress-track, var(--bg));
    background-image: repeating-linear-gradient(
        to right,
        transparent 0,
        transparent 6px,
        var(--border) 6px,
        var(--border) 7px
    );
    overflow: hidden;
    position: relative;
}

.dl-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--progress-fill);
    background-image: repeating-linear-gradient(
        to right,
        var(--progress-fill) 0,
        var(--progress-fill) 6px,
        rgba(0,0,0,0.22) 6px,
        rgba(0,0,0,0.22) 7px
    );
    transition: width 0.25s ease;
}
[data-theme="light"] .dl-progress-fill {
    background-image: repeating-linear-gradient(
        to right,
        var(--progress-fill) 0,
        var(--progress-fill) 6px,
        rgba(255,255,255,0.45) 6px,
        rgba(255,255,255,0.45) 7px
    );
}

.dl-progress-fill.is-indeterminate {
    width: 100% !important;
    background-image: linear-gradient(
        90deg,
        var(--accent-soft) 0%,
        var(--progress-fill) 50%,
        var(--accent-soft) 100%
    );
    background-size: 200% 100%;
    animation: progress-scan 1.2s linear infinite;
    transition: none;
}

.dl-readout {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-family: ui-monospace, 'SF Mono', 'Cascadia Code', monospace;
    font-size: 0.7rem;
    line-height: 1.3;
    white-space: nowrap;
    min-width: 60px;
}
.dl-status  { color: var(--text-main); font-weight: 600; }
.dl-detail  { color: var(--text-sub); }

.dl-cancel-btn {
    flex-shrink: 0;
    width: 26px; height: 26px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: transparent;
    color: var(--text-sub);
    transition: border-color var(--transition-fast), color var(--transition-fast);
}
.dl-cancel-btn:hover  { border-color: var(--error); color: var(--error); }
.dl-cancel-btn .material-symbols-rounded { font-size: 15px; width: 15px; height: 15px; }

/* ── Result panel ────────────────────────────────────────────────────────── */
.dl-result-panel {
    padding: 10px 12px;
    border-top: 1px solid var(--border);
    display: none;
}
.dl-result-panel.visible { display: block; }

.dl-result-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 9px 10px;
    border-radius: var(--radius-btn);
    border: 1px solid rgba(54,209,164,0.35);
    background: rgba(54,209,164,0.10);
    color: var(--success);
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    transition: background var(--transition-fast);
    overflow: hidden;
}
.dl-result-link:hover { background: rgba(54,209,164,0.20); }
.dl-result-link .material-symbols-rounded { font-size: 18px; width: 18px; height: 18px; flex-shrink: 0; }
.dl-result-filename { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Error panel ─────────────────────────────────────────────────────────── */
.dl-error-panel {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-top: 1px solid var(--border);
    background: var(--error-soft);
    color: var(--error);
    font-size: 0.8rem;
}
.dl-error-panel.visible { display: flex; }
.dl-error-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-error-panel .material-symbols-rounded { font-size: 18px; width: 18px; height: 18px; flex-shrink: 0; }
.dl-retry-btn { flex-shrink: 0; border: none; background: transparent; color: inherit; display: flex; align-items: center; }

/* ── Quality menu ───────────────────────────────────────────────────────── */
.quality-menu {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 0;
    width: 100%;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.55);
    display: none;
    flex-direction: column;
    z-index: 10;
    overflow: hidden;
    transform-origin: bottom center;
    animation: menuPop 0.15s ease;
}
@keyframes menuPop {
    from { opacity: 0; transform: scaleY(0.88); }
    to   { opacity: 1; transform: scaleY(1);    }
}

.quality-item {
    padding: 11px 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border);
}
.quality-item:last-child { border-bottom: none; }
.quality-item:hover  { background: var(--search-bg); }
.quality-item:active { background: var(--border); }
.quality-item .badge {
    margin-left: auto;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--search-bg);
    color: var(--text-sub);
}
.quality-item.best .badge {
    background: rgba(34,197,94,0.15);
    color: var(--success);
}

/* ── History Drawer ─────────────────────────────────────────────────────── */
.drawer {
    position: fixed;
    top: 0; right: -340px;
    width: 320px;
    max-width: 90vw;
    height: 100%;
    background: var(--drawer-bg);
    border-left: 1px solid var(--border);
    z-index: 500;
    display: flex;
    flex-direction: column;
    transition: right var(--transition-slow);
    overflow: hidden;
}
.drawer.open { right: 0; }

.drawer-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 499;
    backdrop-filter: blur(2px);
}
.drawer-backdrop.open { display: block; }

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.drawer-title { font-size: 15px; font-weight: 700; }

.history-list {
    overflow-y: auto;
    flex-grow: 1;
    padding: 8px 0;
}
.history-list::-webkit-scrollbar { width: 4px; }
.history-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.history-empty {
    text-align: center;
    color: var(--text-sub);
    padding: 60px 20px;
    font-size: 13px;
    display: flex; flex-direction: column; align-items: center; gap: 10px;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    transition: background var(--transition-fast);
}
.history-item:last-child { border-bottom: none; }
.history-item:hover { background: var(--search-bg); }
.history-item:active { background: var(--border); }

.history-thumb {
    width: 56px; height: 40px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--search-bg);
}
.history-info { flex-grow: 1; overflow: hidden; }
.history-title {
    font-size: 12px; font-weight: 600;
    color: var(--text-main);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.history-meta  { font-size: 11px; color: var(--text-sub); margin-top: 2px; }
.history-badge {
    font-size: 10px; font-weight: 700;
    padding: 2px 6px; border-radius: 4px;
    flex-shrink: 0;
}
.history-badge.video { background: rgba(255,255,255,0.12); color: var(--text-main); }
.history-badge.audio { background: rgba(255,255,255,0.07); color: var(--text-sub); }
[data-theme="light"] .history-badge.video { background: rgba(0,0,0,0.08); }
[data-theme="light"] .history-badge.audio { background: rgba(0,0,0,0.05); }

/* ── Toast notifications ────────────────────────────────────────────────── */
#toastContainer {
    position: fixed;
    bottom: 16px; left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column-reverse;
    gap: 8px;
    align-items: center;
    pointer-events: none;
    width: min(90vw, 360px);
}

@keyframes toastIn  { from { opacity: 0; transform: translateY(12px) scale(0.96); }
                      to   { opacity: 1; transform: translateY(0)     scale(1);    } }
@keyframes toastOut { from { opacity: 1; transform: translateY(0)     scale(1);    }
                      to   { opacity: 0; transform: translateY(8px)   scale(0.95); } }

.toast {
    background: var(--toast-bg);
    color: var(--toast-txt);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    animation: toastIn 0.22s ease;
    pointer-events: auto;
}
.toast.success .toast-icon { color: var(--success); }
.toast.error   .toast-icon { color: var(--error); }
.toast.info    .toast-icon { color: #60a5fa; }
.toast.warning .toast-icon { color: var(--warning); }
.toast-icon { font-size: 18px; width: 18px; height: 18px; flex-shrink: 0; }

/* ── Animations (shared) ────────────────────────────────────────────────── */
@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes iconPop {
    0%   { transform: scale(0.5); opacity: 0; }
    60%  { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1);   opacity: 1; }
}
.icon-pop { animation: iconPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); }

@keyframes iconShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-3px); }
    40%, 80% { transform: translateX(3px); }
}
.icon-shake { animation: iconShake 0.4s ease; }

/* ── Scrollbar (desktop) ────────────────────────────────────────────────── */
::-webkit-scrollbar       { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
