/* AudioRush PWA - Modern 2025/2026 UI */

:root {
    /* Base colors */
    --bg: #09090b;
    --bg-elevated: #18181b;
    --bg-hover: #27272a;
    --text: #fafafa;
    --text-muted: #71717a;
    --accent: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.4);
    --danger: #ef4444;
    --danger-glow: rgba(239, 68, 68, 0.4);
    --border: #27272a;
    --radius: 16px;

    /* Glass effects */
    --glass-bg: rgba(24, 24, 27, 0.75);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-blur: 16px;

    /* Accent gradient system */
    --accent-gradient: linear-gradient(135deg, #3b82f6, #8b5cf6);
    --accent-gradient-hover: linear-gradient(135deg, #60a5fa, #a78bfa);

    /* Enhanced shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 40px rgba(59, 130, 246, 0.15);

    /* Timing functions */
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { height: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    letter-spacing: -0.01em;
    height: 100%;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }

/* === LOGIN === */
body.login-page {
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    padding: 20px;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
        var(--bg);
}
.login-container {
    width: 100%;
    max-width: 360px;
    animation: fade-in-up 0.5s var(--ease-out);
}
.login-box {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}
.login-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}
.login-box .form-group { margin-bottom: 1.25rem; }
.login-box label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    letter-spacing: 0.01em;
}
.login-box input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(9, 9, 11, 0.6);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.login-box input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}
.login-box input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: rgba(9, 9, 11, 0.8);
}
.login-box button {
    width: 100%;
    padding: 0.875rem;
    background: var(--accent-gradient);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s var(--ease-spring), box-shadow 0.2s, filter 0.2s;
    box-shadow: 0 4px 16px var(--accent-glow);
}
.login-box button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--accent-glow);
    filter: brightness(1.05);
}
.login-box button:active {
    transform: translateY(0);
    filter: brightness(0.95);
}
.error-msg {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger);
    color: var(--danger);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
    text-align: center;
}

/* === APP LAYOUT === */
.app {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    height: 100vh;
    max-width: 720px;
    margin: 0 auto;
    padding: clamp(16px, 4vw, 32px);
    padding-top: max(env(safe-area-inset-top), clamp(16px, 4vw, 32px));
    padding-bottom: max(env(safe-area-inset-bottom), clamp(16px, 4vw, 32px));
    gap: clamp(16px, 3vw, 24px);
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    animation: fade-in-up 0.4s var(--ease-out);
}
.logo {
    font-size: clamp(1.25rem, 4vw, 1.75rem);
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}
.logo.centered {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2rem;
}
.logo.viewing-date {
    font-size: clamp(0.9rem, 3vw, 1.1rem);
    background: none;
    -webkit-text-fill-color: var(--text);
}
.btn-ghost {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 12px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s var(--ease-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}
.btn-ghost:hover {
    background: var(--bg-hover);
    color: var(--text);
    transform: scale(1.05);
}
.btn-ghost:active { transform: scale(0.95); }

/* Main - no borders */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: clamp(12px, 2vw, 20px);
    min-height: 0;
    animation: fade-in-up 0.5s var(--ease-out) 0.1s both;
    border: none;
    outline: none;
    box-shadow: none;
}

/* Summary - clean, no borders */
.summary-section {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 0;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent;
}
.summary-section::before,
.summary-section::after {
    display: none !important;
}
.summary {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 0;
    font-size: clamp(0.95rem, 2.2vw, 1.15rem);
    line-height: 1.8;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* Hide scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;
    /* No borders */
    border: none;
    outline: none;
    box-shadow: none;
    /* GPU acceleration */
    transform: translateZ(0);
    will-change: contents;
}
.summary::-webkit-scrollbar {
    display: none;
}
.summary *,
.summary *::before,
.summary *::after {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}
.summary.updating { opacity: 0.6; transform: scale(0.995); }
.summary.compact { font-size: clamp(0.85rem, 1.8vw, 0.95rem); justify-content: flex-start; }
.summary.normal { font-size: clamp(0.9rem, 2vw, 1.05rem); }
.summary.large { font-size: clamp(1rem, 2.5vw, 1.2rem); }
.summary h3, .summary h4, .summary strong:first-child, .summary > strong {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    margin: 0;
    margin-top: 1.5em;
    display: block;
}
.summary > *:first-child { margin-top: 0; }
.summary ul + strong, .summary ol + strong { margin-top: 1.5em; }
.summary ul, .summary ol { margin: 0; padding-left: 1.25em; }
.summary li { margin: 0; line-height: 1.5; }
.summary li strong {
    color: var(--accent);
    display: inline;
    margin: 0;
    background: none;
    -webkit-text-fill-color: var(--accent);
}
.summary p { margin: 0; }
.summary br { display: none; }

/* KI-Antworten Section - special styling */
.summary .ki-section {
    background: linear-gradient(135deg, #10b981, #34d399) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    font-weight: 700;
    font-size: 1.1em;
    margin-top: 1.5em;
    display: block;
    letter-spacing: 0.02em;
}
.summary .ki-section + ul {
    padding-left: 1.25em;
    margin-left: 0;
    margin-top: 0.5em;
}
.summary .ki-section + ul li {
    color: rgba(250, 250, 250, 0.95);
}
.placeholder {
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    opacity: 0.8;
}

/* Live Ticker - minimal inline text */
.live-ticker {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    height: 20px;
    padding: 0;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.3s;
}
.live-ticker.active {
    opacity: 1;
}
.ticker-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--text-muted);
    flex-shrink: 0;
    transition: background 0.3s, box-shadow 0.3s;
}
.ticker-dot.live {
    background: var(--danger);
    animation: pulse-glow 1.5s infinite;
    box-shadow: 0 0 6px var(--danger-glow);
}
@keyframes pulse-glow {
    0%, 100% { opacity: 1; box-shadow: 0 0 6px var(--danger-glow); }
    50% { opacity: 0.6; box-shadow: 0 0 10px var(--danger-glow); }
}
.ticker-text {
    max-width: 280px;
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    direction: rtl;
    text-align: left;
}
.ticker-text:empty::after {
    content: '...';
    opacity: 0.4;
    direction: ltr;
}
.ticker-text .interim {
    color: var(--text);
    opacity: 0.6;
}

/* Footer - compact */
footer {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    animation: fade-in-up 0.5s var(--ease-out) 0.2s both;
}

/* Mic Button - compact */
.mic-btn-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mic-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: var(--accent-gradient);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s var(--ease-spring);
    box-shadow: 0 2px 16px var(--accent-glow);
    -webkit-tap-highlight-color: transparent;
    position: relative;
    z-index: 2;
}
.mic-btn svg {
    width: 22px;
    height: 22px;
}
.mic-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px var(--accent-glow);
}
.mic-btn:active { transform: scale(0.95); }
.mic-btn.recording {
    background: var(--danger);
    box-shadow: 0 2px 16px var(--danger-glow);
}

/* Animated rings for recording state */
.mic-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid var(--danger);
    opacity: 0;
    pointer-events: none;
    z-index: 1;
}
.mic-btn.recording ~ .mic-ring {
    animation: ring-pulse 2s ease-out infinite;
}
.mic-btn.recording ~ .mic-ring:nth-child(2) {
    animation-delay: 0.5s;
}
.mic-btn.recording ~ .mic-ring:nth-child(3) {
    animation-delay: 1s;
}
.mic-btn.recording ~ .mic-ring:nth-child(4) {
    display: none;
}

@keyframes ring-pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.8);
        opacity: 0;
    }
}

/* === OVERLAY & MODALS === */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s var(--ease-smooth);
    z-index: 999;
}
.overlay.visible { opacity: 1; visibility: visible; }

/* Drawer */
.drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(400px, 85vw);
    height: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid var(--glass-border);
    z-index: 1000;
    transition: right 0.3s var(--ease-smooth);
    display: flex;
    flex-direction: column;
    padding-top: env(safe-area-inset-top, 0px);
    padding-right: env(safe-area-inset-right, 0px);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.3);
}
.drawer.open { right: 0; }
.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--glass-border);
}
.drawer-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* History List */
.history-list {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px;
}
.history-item {
    padding: 16px;
    background: rgba(9, 9, 11, 0.5);
    border: 1px solid transparent;
    border-radius: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.25s var(--ease-smooth);
    -webkit-tap-highlight-color: transparent;
    position: relative;
    animation: fade-in-up 0.3s var(--ease-out) both;
}
.history-item:nth-child(1) { animation-delay: 0.05s; }
.history-item:nth-child(2) { animation-delay: 0.1s; }
.history-item:nth-child(3) { animation-delay: 0.15s; }
.history-item:nth-child(4) { animation-delay: 0.2s; }
.history-item:nth-child(5) { animation-delay: 0.25s; }
.history-item:nth-child(n+6) { animation-delay: 0.3s; }

.history-item::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    padding: 1px;
    background: linear-gradient(135deg, transparent, transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.25s, background 0.25s;
}
.history-item:hover {
    background: var(--bg-hover);
    transform: translateX(4px);
}
.history-item:hover::before {
    background: var(--accent-gradient);
    opacity: 1;
}
.history-item:active { transform: scale(0.98) translateX(4px); }
.history-item-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 4px;
    letter-spacing: 0.02em;
}
.history-item-title {
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.01em;
}
.history-item-actions { display: flex; gap: 8px; margin-top: 12px; }
.history-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 20px;
    font-style: italic;
    opacity: 0.8;
}

/* Drawer Footer */
.drawer-footer {
    padding: 16px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--glass-border);
    background: rgba(24, 24, 27, 0.5);
}
.btn-delete-all {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s var(--ease-smooth);
    -webkit-tap-highlight-color: transparent;
}
.btn-delete-all:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger);
    color: var(--danger);
}
.btn-delete-all:active {
    transform: scale(0.98);
}

/* Buttons */
.btn-small {
    padding: 6px 12px;
    font-size: 0.75rem;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s var(--ease-smooth);
    -webkit-tap-highlight-color: transparent;
}
.btn-small:hover {
    background: var(--bg-hover);
    color: var(--text);
    border-color: var(--text-muted);
}
.btn-small.danger:hover {
    background: var(--danger);
    border-color: var(--danger);
    color: white;
}

/* Confirm Dialog */
.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s var(--ease-smooth);
    z-index: 1001;
}
.modal.open { opacity: 1; visibility: visible; }
.modal-content {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    max-width: 360px;
    width: 100%;
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s var(--ease-spring);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}
.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}
.modal.open .modal-content { transform: scale(1) translateY(0); }
.confirm-dialog .modal-body {
    padding: 24px;
    text-align: center;
}
.confirm-dialog .confirm-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--danger);
}
.confirm-dialog h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}
.confirm-dialog p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 24px;
    line-height: 1.5;
}
.confirm-actions { display: flex; gap: 12px; }
.confirm-actions button {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s var(--ease-smooth);
    -webkit-tap-highlight-color: transparent;
}
.btn-cancel {
    background: rgba(9, 9, 11, 0.6);
    border: 1px solid var(--border);
    color: var(--text);
}
.btn-cancel:hover {
    background: var(--bg-hover);
    border-color: var(--text-muted);
}
.btn-confirm {
    background: var(--danger);
    border: none;
    color: white;
}
.btn-confirm:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}
.btn-confirm:active {
    transform: translateY(0);
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(113, 113, 122, 0.3);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(113, 113, 122, 0.5);
}

/* === ANIMATIONS === */
@keyframes fade-in-up {
    0% {
        opacity: 0;
        transform: translateY(12px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile */
@media (max-width: 640px) {
    .mic-btn { width: 52px; height: 52px; }
    .mic-btn svg { width: 20px; height: 20px; }
    .mic-ring { width: 52px; height: 52px; }
    .ticker-text { max-width: 200px; font-size: 0.7rem; }

    /* Larger header buttons on mobile for better touch targets */
    header .btn-ghost {
        min-width: 46px;
        min-height: 46px;
        padding: 13px;
    }

    header .btn-ghost svg {
        width: 22px;
        height: 22px;
    }

    /* KI-Antworten Section - Mobile */
    .summary .ki-section {
        font-size: 1em;
        margin-top: 1.25em;
        padding-top: 0.5em;
    }
}

/* Standalone PWA mode */
@media (display-mode: standalone) {
    body { user-select: none; -webkit-user-select: none; }

    /* Extra padding in PWA for home indicator */
    footer {
        padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    }

    /* Ensure header buttons are easily tappable - minimum 16px from safe area */
    .app {
        padding-top: calc(env(safe-area-inset-top, 20px) + 16px);
    }

    /* Larger touch targets in PWA for better accessibility */
    header .btn-ghost {
        min-width: 48px;
        min-height: 48px;
        padding: 14px;
    }

    header .btn-ghost svg {
        width: 22px;
        height: 22px;
    }
}

/* === TEXT MORPH ANIMATIONS === */

/* View Transitions API support */
@supports (view-transition-name: none) {
    ::view-transition-old(root),
    ::view-transition-new(root) {
        animation-duration: 0.35s;
        animation-timing-function: var(--ease-smooth);
    }

    ::view-transition-old(root) {
        animation-name: morph-fade-out;
    }

    ::view-transition-new(root) {
        animation-name: morph-fade-in;
    }
}

@keyframes morph-fade-out {
    0% {
        opacity: 1;
        filter: blur(0);
        transform: scale(1);
    }
    100% {
        opacity: 0;
        filter: blur(4px);
        transform: scale(0.98);
    }
}

@keyframes morph-fade-in {
    0% {
        opacity: 0;
        filter: blur(4px);
        transform: scale(1.02);
    }
    100% {
        opacity: 1;
        filter: blur(0);
        transform: scale(1);
    }
}

/* Streaming state - optimized for speed, no border */
.summary.streaming * {
    transition: none !important;
    animation: none !important;
}

/* Morphing state - smooth content transition */
.summary.morphing {
    animation: morph-content 0.4s var(--ease-smooth);
}

@keyframes morph-content {
    0% {
        opacity: 0.7;
        transform: translateY(2px);
        filter: blur(1px);
    }
    50% {
        opacity: 0.85;
        filter: blur(0.5px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

/* Morph container for word-level animations */
.morph-container {
    animation: morph-in 0.35s var(--ease-smooth);
}

@keyframes morph-in {
    0% {
        opacity: 0.6;
        transform: translateY(4px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Highlight for new content during streaming */
.summary.streaming strong,
.summary.streaming h3,
.summary.streaming h4 {
    animation: highlight-pulse 2s ease-in-out infinite;
}

@keyframes highlight-pulse {
    0%, 100% {
        text-shadow: 0 0 0 transparent;
    }
    50% {
        text-shadow: 0 0 8px var(--accent-glow);
    }
}

/* Smooth list item transitions */
.summary li {
    transition: opacity 0.3s, transform 0.3s;
}

.summary.morphing li {
    animation: list-item-morph 0.35s var(--ease-smooth);
}

@keyframes list-item-morph {
    0% {
        opacity: 0.7;
        transform: translateX(-4px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Stagger animation for list items */
.summary.morphing li:nth-child(1) { animation-delay: 0ms; }
.summary.morphing li:nth-child(2) { animation-delay: 50ms; }
.summary.morphing li:nth-child(3) { animation-delay: 100ms; }
.summary.morphing li:nth-child(4) { animation-delay: 150ms; }
.summary.morphing li:nth-child(5) { animation-delay: 200ms; }
.summary.morphing li:nth-child(n+6) { animation-delay: 250ms; }

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    ::view-transition-old(root),
    ::view-transition-new(root) {
        animation: none;
    }
}
