:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a2e;
    --bg-card-hover: #222240;
    --text-primary: #e8e8f0;
    --text-secondary: #8888a8;
    --text-muted: #555570;
    --accent: #7c5cfc;
    --accent-light: #9b7fff;
    --accent-dark: #5a3dd6;
    --danger: #fc5c7c;
    --success: #5cfc9b;
    --warning: #fccc5c;
    --border: #2a2a40;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 70px;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: var(--accent-light);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--accent);
}

/* ─── Navbar ─────────────────────────────────────────────────────── */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    height: 64px;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}

.navbar.scrolled {
    background: rgba(10, 10, 15, 0.95);
}

.nav-brand {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent-light);
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
}

.nav-link {
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    background: rgba(124, 92, 252, 0.1);
}

.nav-link.active {
    color: var(--accent-light);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

.mobile-nav {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    z-index: 999;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
}

.mobile-nav.open {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-nav-link {
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    font-size: 1rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.mobile-nav-link:hover {
    color: var(--text-primary);
    background: rgba(124, 92, 252, 0.1);
}

/* ─── Sections ───────────────────────────────────────────────────── */

.section {
    min-height: 100vh;
    padding: 100px 2rem 4rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-icon {
    font-size: 1.6rem;
}

/* ─── Hero Section ───────────────────────────────────────────────── */

.hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background: radial-gradient(ellipse at 50% 50%, rgba(124, 92, 252, 0.08) 0%, transparent 70%);
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.avatar-wrapper {
    position: relative;
    width: 160px;
    height: 160px;
}

.avatar {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent);
    box-shadow: 0 0 40px rgba(124, 92, 252, 0.3);
    transition: transform var(--transition);
}

.avatar:hover {
    transform: scale(1.05);
}

.avatar-edit {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 36px;
    height: 36px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: transform var(--transition);
    border: 2px solid var(--bg-primary);
}

.avatar-edit:hover {
    transform: scale(1.1);
}

.hero-name {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-light), #fc5cfc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-bio {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 500px;
    line-height: 1.8;
}

.scroll-hint {
    position: absolute;
    bottom: 2rem;
    animation: bounce 2s infinite;
    color: var(--text-muted);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* ─── Buttons ────────────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(124, 92, 252, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    color: var(--text-primary);
    border-color: var(--accent);
    background: rgba(124, 92, 252, 0.05);
}

.btn-danger {
    background: transparent;
    color: var(--danger);
    border: 1px solid rgba(252, 92, 124, 0.3);
}

.btn-danger:hover {
    background: rgba(252, 92, 124, 0.1);
    border-color: var(--danger);
}

/* ─── Steam Grid ─────────────────────────────────────────────────── */

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

.steam-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all var(--transition);
}

.steam-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 8px 32px rgba(124, 92, 252, 0.15);
}

.steam-card-header {
    position: relative;
    height: 140px;
    overflow: hidden;
}

.steam-card-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.steam-card-body {
    padding: 1rem;
}

.steam-card-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.steam-card-time {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.steam-card-rating {
    color: var(--warning);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.steam-card-review {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.steam-card-actions {
    display: flex;
    gap: 0.5rem;
}

/* ─── Anime Grid ─────────────────────────────────────────────────── */

.anime-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

.anime-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all var(--transition);
    cursor: default;
}

.anime-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 8px 32px rgba(124, 92, 252, 0.15);
}

.anime-card-cover {
    width: 100%;
    height: 280px;
    object-fit: cover;
    background: var(--bg-secondary);
}

.anime-card-cover-placeholder {
    width: 100%;
    height: 280px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 3rem;
}

.anime-card-body {
    padding: 1rem;
}

.anime-card-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.anime-card-rating {
    color: var(--warning);
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
}

.anime-card-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.anime-card-review {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.anime-card-actions {
    display: flex;
    gap: 0.5rem;
}

/* ─── Music Player ───────────────────────────────────────────────── */

.music-player {
    margin-bottom: 2rem;
}

.player-now-playing {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.player-cover {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--bg-secondary);
}

.player-info {
    flex: 1;
    min-width: 0;
}

.player-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.player-artist {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.player-now-playing audio {
    width: 100%;
    max-width: 400px;
    height: 36px;
    border-radius: var(--radius-sm);
}

.player-now-playing audio::-webkit-media-controls-panel {
    background: var(--bg-secondary);
}

/* ─── Music List ─────────────────────────────────────────────────── */

.music-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.music-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: all var(--transition);
    cursor: pointer;
}

.music-item:hover {
    border-color: var(--accent);
    background: var(--bg-card-hover);
}

.music-item.playing {
    border-color: var(--accent);
    background: rgba(124, 92, 252, 0.08);
}

.music-item-cover {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--bg-secondary);
    flex-shrink: 0;
}

.music-item-cover-placeholder {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.music-item-info {
    flex: 1;
    min-width: 0;
}

.music-item-title {
    font-weight: 500;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.music-item-artist {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.music-item-review {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

.music-item-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* ─── Empty State ────────────────────────────────────────────────── */

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.empty-state .empty-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.empty-state .empty-text {
    margin-bottom: 0.25rem;
}

.loading-placeholder {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ─── Modal ──────────────────────────────────────────────────────── */

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-overlay.open {
    display: flex;
}

.modal {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalIn 0.25s ease-out;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 0.25rem;
    line-height: 1;
    transition: color var(--transition);
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
}

/* ─── Form ───────────────────────────────────────────────────────── */

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}

.form-input {
    width: 100%;
    padding: 0.6rem 0.8rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

.form-hint a {
    color: var(--accent-light);
}

/* ─── Star Rating ────────────────────────────────────────────────── */

.star-rating {
    display: flex;
    gap: 0.25rem;
}

.star-rating .star {
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--transition);
}

.star-rating .star.active,
.star-rating .star:hover {
    color: var(--warning);
}

/* ─── File Upload ────────────────────────────────────────────────── */

.file-upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    color: var(--text-muted);
}

.file-upload-area:hover {
    border-color: var(--accent);
    background: rgba(124, 92, 252, 0.03);
}

.file-upload-area p {
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.file-upload-area small {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.file-selected {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.file-selected span {
    flex: 1;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ─── Toast ──────────────────────────────────────────────────────── */

.toast-container {
    position: fixed;
    top: 80px;
    right: 1rem;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    animation: toastIn 0.3s ease-out;
    max-width: 350px;
    box-shadow: var(--shadow);
}

.toast.success {
    background: rgba(92, 252, 155, 0.15);
    color: var(--success);
    border: 1px solid rgba(92, 252, 155, 0.3);
}

.toast.error {
    background: rgba(252, 92, 124, 0.15);
    color: var(--danger);
    border: 1px solid rgba(252, 92, 124, 0.3);
}

.toast.info {
    background: rgba(124, 92, 252, 0.15);
    color: var(--accent-light);
    border: 1px solid rgba(124, 92, 252, 0.3);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ─── Footer ─────────────────────────────────────────────────────── */

.footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--border);
}

/* ─── Nav Right / User Menu ──────────────────────────────────────── */

.nav-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-menu {
    position: relative;
}

.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    font-family: inherit;
    transition: all var(--transition);
}

.user-menu-trigger:hover {
    border-color: var(--accent);
    background: var(--bg-card-hover);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 160px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    padding: 0.4rem 0;
    display: none;
    z-index: 1001;
}

.user-dropdown.open {
    display: block;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 0.6rem 1rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: all var(--transition);
}

.dropdown-item:hover {
    color: var(--text-primary);
    background: rgba(124, 92, 252, 0.1);
}

.dropdown-item-danger {
    color: var(--danger);
}

.dropdown-item-danger:hover {
    color: var(--danger);
    background: rgba(252, 92, 124, 0.1);
}

.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 0.4rem 0;
}

.mobile-nav-divider {
    height: 1px;
    background: var(--border);
    margin: 0.5rem 0;
}

.mobile-nav-link-danger {
    color: var(--danger) !important;
}

/* ─── Auth Page ──────────────────────────────────────────────────── */

.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    padding: 2rem;
}

.auth-container {
    width: 100%;
    max-width: 420px;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow);
}

.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--accent-light);
    letter-spacing: 2px;
}

.auth-logo p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.3rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-hint {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    accent-color: var(--accent);
}

.auth-link {
    color: var(--accent-light);
    font-size: 0.85rem;
}

.auth-link:hover {
    color: var(--accent);
    text-decoration: underline;
}

.auth-footer {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.auth-message {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    text-align: center;
}

.auth-message.error {
    background: rgba(252, 92, 124, 0.1);
    color: var(--danger);
    border: 1px solid rgba(252, 92, 124, 0.2);
}

.auth-message.success {
    background: rgba(92, 252, 155, 0.1);
    color: var(--success);
    border: 1px solid rgba(92, 252, 155, 0.2);
}

.auth-error {
    background: rgba(252, 92, 124, 0.1);
    color: var(--danger);
    border: 1px solid rgba(252, 92, 124, 0.2);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    text-align: center;
    margin-bottom: 1rem;
}

/* ─── Responsive ─────────────────────────────────────────────────── */

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-right {
        display: none;
    }

    .hero-name {
        font-size: 2rem;
    }

    .avatar {
        width: 120px;
        height: 120px;
    }

    .avatar-wrapper {
        width: 120px;
        height: 120px;
    }

    .section {
        padding: 80px 1rem 3rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .steam-grid {
        grid-template-columns: 1fr;
    }

    .anime-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

    .anime-card-cover,
    .anime-card-cover-placeholder {
        height: 200px;
    }

    .player-now-playing {
        flex-direction: column;
        text-align: center;
    }

    .music-item {
        flex-wrap: wrap;
    }

    .music-item-review {
        max-width: 100%;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .auth-card {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .anime-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .anime-card-cover,
    .anime-card-cover-placeholder {
        height: 160px;
    }
}

/* ─── Cover Upload Component ─────────────────────────────────────── */

.cover-mode-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.cover-mode-tab {
    flex: 1;
    padding: 0.4rem 0.75rem;
    background: var(--bg-primary);
    color: var(--text-secondary);
    border: none;
    font-size: 0.8rem;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition);
}

.cover-mode-tab:first-child {
    border-right: 1px solid var(--border);
}

.cover-mode-tab.active {
    background: var(--accent);
    color: white;
}

.cover-mode-tab:hover:not(.active) {
    background: var(--bg-card);
}

.cover-upload-area {
    margin-top: 0.25rem;
}

.cover-upload-dropzone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    color: var(--text-muted);
}

.cover-upload-dropzone:hover {
    border-color: var(--accent);
    background: rgba(124, 92, 252, 0.03);
}

.cover-upload-dropzone.dragover {
    border-color: var(--accent);
    background: rgba(124, 92, 252, 0.08);
}

.cover-upload-dropzone p {
    margin-top: 0.4rem;
    font-size: 0.85rem;
}

.cover-upload-dropzone small {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.cover-preview {
    position: relative;
    display: inline-block;
    margin-top: 0.5rem;
}

.cover-preview img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.cover-preview-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition);
}

.cover-preview-remove:hover {
    transform: scale(1.1);
}

.cover-url-input {
    margin-top: 0.25rem;
}

/* ─── Nav Icon Button & Badge ────────────────────────────────────── */

.nav-icon-btn {
    position: relative;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.4rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition), background var(--transition);
    margin-right: 0.5rem;
}

.nav-icon-btn:hover {
    color: var(--text-primary);
    background: rgba(124, 92, 252, 0.1);
}

.nav-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    background: var(--danger);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    animation: pulse 2s infinite;
}

/* ─── Friend Panel ───────────────────────────────────────────────── */

.friend-panel-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1900;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(2px);
}

.friend-panel-overlay.open { display: block; }

.friend-panel {
    position: fixed;
    top: 0;
    right: -380px;
    width: 360px;
    height: 100vh;
    z-index: 1950;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -8px 0 40px rgba(0,0,0,0.4);
    overflow-y: auto;
}

.friend-panel.open { right: 0; }

.friend-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--bg-secondary);
    z-index: 1;
}

.friend-panel-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.friend-panel-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    transition: color var(--transition);
}

.friend-panel-close:hover { color: var(--text-primary); }

.friend-add-section {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.friend-search-row {
    display: flex;
    gap: 0.5rem;
}

.friend-search-row .form-input {
    flex: 1;
}

.friend-section-title {
    padding: 0.75rem 1.5rem 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.friend-badge {
    background: var(--accent);
    color: white;
    font-size: 0.65rem;
    border-radius: 8px;
    padding: 1px 6px;
}

.friend-request-item,
.friend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    transition: background var(--transition);
    cursor: pointer;
}

.friend-request-item:hover,
.friend-item:hover {
    background: rgba(124, 92, 252, 0.06);
}

.friend-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    flex-shrink: 0;
    background: var(--bg-card);
}

.friend-info {
    flex: 1;
    min-width: 0;
}

.friend-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.friend-username {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.friend-request-actions {
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0;
}

.friend-unread {
    background: var(--danger);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 8px;
    padding: 2px 7px;
    flex-shrink: 0;
}

.friend-empty {
    padding: 2rem 1.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
}

/* ─── Chat Modal ─────────────────────────────────────────────────── */

.chat-modal {
    max-width: 560px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden !important;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chat-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg-card);
    border: 2px solid var(--border);
}

.chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    min-height: 300px;
    max-height: 400px;
    background: var(--bg-primary);
}

.chat-bubble-row {
    display: flex;
    flex-direction: column;
}

.chat-bubble-row.mine {
    align-items: flex-end;
}

.chat-bubble-row.theirs {
    align-items: flex-start;
}

.chat-bubble {
    max-width: 72%;
    padding: 0.6rem 0.9rem;
    border-radius: 14px;
    font-size: 0.9rem;
    line-height: 1.5;
    word-break: break-word;
    white-space: pre-wrap;
}

.chat-bubble-row.mine .chat-bubble {
    background: var(--accent);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-bubble-row.theirs .chat-bubble {
    background: var(--bg-card);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
    border: 1px solid var(--border);
}

.chat-time {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 2px;
    padding: 0 2px;
}

.chat-footer {
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
}

.chat-input {
    flex: 1;
    padding: 0.6rem 0.8rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    resize: none;
    transition: border-color var(--transition);
    line-height: 1.5;
}

.chat-input:focus {
    outline: none;
    border-color: var(--accent);
}

.chat-empty {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: auto;
}
