/* ─── App Header ────────────────────────────────────────── */
.app-header {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    background: rgba(244, 241, 235, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--app-card-border);
    position: sticky;
    top: 0;
    z-index: 20;
    flex-shrink: 0;
    transition: background var(--transition-normal);
}

[data-theme='dark'] .app-header {
    background: rgba(15, 14, 12, 0.88);
}

[data-theme='light'] .app-header {
    background: rgba(250, 250, 248, 0.88);
}

/* Base title style (shared) */
.app-title {
    font-family: var(--font-serif);
    font-weight: 600;
    letter-spacing: -0.02em;
    user-select: none;
    display: inline-block;
}

/* Static title with gradient (header/footer default) */
.app-title:not(.animated-title) {
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--app-primary), #c4853a);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-shrink: 0;
}

/* Animated title container (NO background) */
.animated-title {
    display: inline-flex;
    background: none !important;
    font-size: 1.5rem;
}

/* Individual letters with their own gradient context */
.wave-char {
    display: inline-block;
    white-space: pre;
    background: linear-gradient(135deg, var(--app-primary), #c4853a);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: waveLetter 2.5s infinite ease-in-out;
    animation-delay: calc(var(--char-index) * 0.08s);
}

@keyframes waveLetter {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}

/* ─── Library Container ─────────────────────────────────── */
.library-container {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 2rem 2rem;
    min-height: 0;
}

/* ─── App Footer ─────────────────────────────────────────── */
.app-footer {
    flex-shrink: 0;
    border-top: 1px solid var(--app-card-border);
    background: var(--app-surface);
    padding: 1.25rem 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-creator {
    font-size: 0.82rem;
    color: var(--app-muted);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.footer-mail {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--app-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-mail:hover {
    color: var(--app-primary-hover);
    text-decoration: underline;
}

.vertical-spacer {
    height: 3rem;
    width: 100%;
}