* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', 'Poppins', sans-serif;
}

:root {
    --bg-deep: #03050b;
    --bg-surface: rgba(12, 16, 28, 0.75);
    --bg-card: rgba(22, 28, 46, 0.85);
    --bg-card-hover: rgba(38, 45, 70, 0.95);
    --primary: #ff5e7c;
    --primary-dark: #e04b68;
    --primary-glow: #ff7f9f;
    --secondary: #6e8cff;
    --accent-teal: #2edfa0;
    --amber: #ffcd6b;
    --text-primary: #f3f0ff;
    --text-secondary: #a5b0d9;
    --border-light: rgba(65, 75, 110, 0.4);
    --grad-1: linear-gradient(135deg, #ff5e7c, #a96eff);
    --grad-2: linear-gradient(120deg, #2edfa0, #6e8cff);
    --shadow-elevation: 0 20px 35px -12px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.03);
}

body {
    background: radial-gradient(ellipse at 30% 40%, #0a0e1a, #010105);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ========== EPIC LOADING SCREEN ========== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #010105;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s cubic-bezier(0.2, 0.9, 0.4, 1.1), visibility 0.8s;
    overflow: hidden;
}

.cosmic-vortex {
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(255, 94, 124, 0.2) 0%, rgba(169, 110, 255, 0.1) 30%, transparent 70%);
    pointer-events: none;
    animation: vortexRotate 20s linear infinite;
}

@keyframes vortexRotate {
    0% { transform: rotate(0deg) scale(1); }
    100% { transform: rotate(360deg) scale(1.2); }
}

.loading-container {
    text-align: center;
    z-index: 10;
    position: relative;
}

.manga-spiral {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto 30px;
}

.spiral-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    border: 2px solid transparent;
    transform: translate(-50%, -50%);
}

.ring-1 {
    width: 120px;
    height: 120px;
    border-top-color: #ff5e7c;
    border-right-color: #ff5e7c;
    animation: spinRing 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

.ring-2 {
    width: 90px;
    height: 90px;
    border-bottom-color: #2edfa0;
    border-left-color: #2edfa0;
    animation: spinRingReverse 1s ease-in-out infinite;
}

.ring-3 {
    width: 60px;
    height: 60px;
    border-top-color: #a96eff;
    border-bottom-color: #a96eff;
    animation: spinRing 0.8s linear infinite;
}

.spiral-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #ff5e7c, #a96eff);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px rgba(255, 94, 124, 0.6);
    animation: corePulse 1.5s ease-in-out infinite;
}

.spiral-core i {
    font-size: 1.5rem;
    color: white;
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.5));
}

@keyframes spinRing {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes spinRingReverse {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(-360deg); }
}

@keyframes corePulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); box-shadow: 0 0 20px rgba(255, 94, 124, 0.6); }
    50% { transform: translate(-50%, -50%) scale(1.1); box-shadow: 0 0 40px rgba(255, 94, 124, 0.9); }
}

.loading-text-glow {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: 4px;
}

.glow-char {
    display: inline-block;
    background: linear-gradient(135deg, #fff, #ff5e7c, #a96eff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: charGlow 1.5s ease-in-out infinite;
    animation-delay: calc(0.1s * var(--i, 0));
}

.glow-char:nth-child(1) { --i: 0; }
.glow-char:nth-child(2) { --i: 1; }
.glow-char:nth-child(3) { --i: 2; }
.glow-char:nth-child(4) { --i: 3; }
.glow-char:nth-child(5) { --i: 4; }
.glow-char:nth-child(6) { --i: 5; }
.glow-char:nth-child(7) { --i: 6; }
.glow-char:nth-child(8) { --i: 7; }

@keyframes charGlow {
    0%, 100% { opacity: 0.6; text-shadow: 0 0 0px rgba(255, 94, 124, 0); }
    50% { opacity: 1; text-shadow: 0 0 15px rgba(255, 94, 124, 0.8); }
}

.loading-progress-bar {
    width: 280px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin: 20px auto;
    overflow: hidden;
}

.progress-fill-loader {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #ff5e7c, #a96eff, #2edfa0);
    border-radius: 10px;
    transition: width 0.2s ease;
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

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

.loading-tagline {
    font-size: 0.85rem;
    color: #a5b0d9;
    letter-spacing: 2px;
    margin-top: 10px;
}

.floating-pages {
    margin-top: 25px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.floating-pages i {
    font-size: 1.2rem;
    color: rgba(255, 94, 124, 0.6);
    animation: floatIcon 2s ease-in-out infinite;
}

.floating-pages i:nth-child(1) { animation-delay: 0s; }
.floating-pages i:nth-child(2) { animation-delay: 0.3s; }
.floating-pages i:nth-child(3) { animation-delay: 0.6s; }
.floating-pages i:nth-child(4) { animation-delay: 0.9s; }

@keyframes floatIcon {
    0%, 100% { transform: translateY(0); opacity: 0.4; }
    50% { transform: translateY(-10px); opacity: 1; }
}

.cosmic-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: radial-gradient(circle at 20% 30%, rgba(98, 0, 255, 0.08), transparent 50%);
    pointer-events: none;
}

.cosmic-bg::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(2px 2px at 15% 30%, rgba(255, 255, 200, 0.4), transparent),
                      radial-gradient(1px 1px at 72% 18%, rgba(255, 200, 150, 0.4), transparent),
                      radial-gradient(1.5px 1.5px at 45% 85%, rgba(255, 94, 124, 0.3), transparent);
    background-size: 200px 200px, 150px 150px, 180px 180px;
    background-repeat: no-repeat;
    animation: starDrift 40s linear infinite;
}

@keyframes starDrift {
    0% { background-position: 0% 0%, 0% 0%, 0% 0%; }
    100% { background-position: 200px 200px, -150px 150px, 180px -180px; }
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s cubic-bezier(0.2, 0.9, 0.4, 1.1), transform 0.8s ease;
}

.glass-panel {
    background: rgba(12, 18, 28, 0.65);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border-radius: 36px;
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon-wrapper {
    position: relative;
}

.logo-icon {
    font-size: 2.2rem;
    color: var(--primary);
    filter: drop-shadow(0 0 8px rgba(255, 94, 124, 0.6));
    animation: float 3s infinite ease-in-out;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.logo-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 94, 124, 0.3), transparent);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(1);
    animation: logoPulse 2s infinite;
}

@keyframes logoPulse {
    0% { opacity: 0.5; transform: translate(-50%, -50%) scale(0.8); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1.5); }
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(130deg, #ffffff, #ffb3c6, #c08eff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.search-wrapper {
    position: relative;
    width: 340px;
}

#search-input, #add-search-input {
    width: 100%;
    padding: 0.85rem 1.2rem 0.85rem 2.8rem;
    background: rgba(22, 28, 46, 0.8);
    border: 1px solid var(--border-light);
    border-radius: 60px;
    color: white;
    font-size: 0.95rem;
    transition: all 0.3s;
    backdrop-filter: blur(4px);
}

#search-input:focus, #add-search-input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 94, 124, 0.25);
    background: rgba(30, 38, 58, 0.9);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 0.9rem;
    pointer-events: none;
}

.search-results {
    position: absolute;
    top: calc(100% + 0.6rem);
    left: 0;
    right: 0;
    background: rgba(18, 24, 38, 0.98);
    backdrop-filter: blur(16px);
    border-radius: 24px;
    border: 1px solid rgba(255, 94, 124, 0.3);
    box-shadow: var(--shadow-elevation);
    max-height: 380px;
    overflow-y: auto;
    z-index: 200;
    display: none;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1rem;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.search-result-item:hover {
    background: rgba(255, 94, 124, 0.15);
}

.search-result-item img {
    width: 40px;
    height: 55px;
    object-fit: cover;
    border-radius: 8px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 1.8rem;
    margin-top: 0.8rem;
}

.side-panel {
    border-radius: 36px;
    padding: 1.8rem 1.4rem;
    height: fit-content;
    position: sticky;
    top: 1rem;
}

.stat-highlight {
    background: linear-gradient(145deg, rgba(255, 94, 124, 0.15), rgba(169, 110, 255, 0.1));
    border-radius: 28px;
    padding: 1.5rem 1rem;
    margin-bottom: 1.8rem;
    text-align: center;
    border: 1px solid rgba(255, 94, 124, 0.3);
    transition: all 0.3s;
}

.stat-highlight:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px -10px rgba(255, 94, 124, 0.4);
}

.stat-highlight h3 {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.stat-highlight .big-number {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(130deg, #ffffff, var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1;
}

.stats-mini-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
}

.stat-mini-card {
    background: rgba(22, 28, 46, 0.7);
    border-radius: 22px;
    padding: 1rem 0.5rem;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.stat-mini-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 25px -8px rgba(255, 94, 124, 0.4);
}

.stat-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

.stat-mini-card .value {
    font-size: 1.7rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff, #c0a8ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

.stat-mini-card .label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    margin-top: 0.2rem;
}

.chart-container {
    margin: 1.5rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 170px;
    position: relative;
}

.chart-subtitle {
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: -10px;
    margin-bottom: 10px;
}

.legend-group {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.legend-dot.reading { background: #2edfa0; box-shadow: 0 0 5px #2edfa0; }
.legend-dot.completed { background: #6e8cff; box-shadow: 0 0 5px #6e8cff; }
.legend-dot.planned { background: #ffcd6b; box-shadow: 0 0 5px #ffcd6b; }
.legend-dot.dropped { background: #ff5e7c; box-shadow: 0 0 5px #ff5e7c; }

.content-card {
    border-radius: 40px;
    padding: 2rem;
}

.nav-items {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
}

.nav-item {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.6rem 1.5rem;
    border-radius: 40px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-item:hover, .nav-item.active {
    background: var(--grad-1);
    color: white;
    transform: translateY(-2px);
}

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

.section-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(145deg, #fff, #c5b3ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.section-header h2 i {
    background: none;
    background-clip: unset;
    color: var(--primary);
    margin-right: 0.5rem;
}

.filter-pills {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.pill {
    background: rgba(22, 28, 46, 0.8);
    border: none;
    color: var(--text-secondary);
    padding: 0.5rem 1.3rem;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(4px);
}

.pill:hover, .pill.active {
    background: var(--grad-1);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 94, 124, 0.4);
    transform: translateY(-2px);
}

.rating-filter-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    justify-content: flex-end;
}

.rating-filter-row label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.rating-select {
    background: rgba(22, 28, 46, 0.8);
    border: 1px solid var(--border-light);
    border-radius: 40px;
    padding: 0.5rem 1rem;
    color: white;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.rating-select:hover {
    border-color: var(--primary);
}

.year-slider-container {
    background: rgba(22, 28, 46, 0.6);
    border-radius: 60px;
    padding: 0.8rem 1.5rem;
    margin: 1rem 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.slider-controls {
    flex: 2;
    min-width: 250px;
}

.slider-ticks {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.slider-tick {
    background: rgba(43, 48, 69, 0.7);
    color: #aaa;
    padding: 0.3rem 1rem;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.slider-tick:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.05);
}

.slider-tick.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 12px var(--primary);
}

.month-badge {
    color: var(--primary);
    font-weight: 600;
    background: rgba(255, 94, 124, 0.15);
    padding: 0.5rem 1.4rem;
    border-radius: 30px;
    font-size: 0.85rem;
    backdrop-filter: blur(4px);
}

.continue-reading {
    margin: 1rem 0;
}

.continue-card {
    background: linear-gradient(135deg, rgba(255, 94, 124, 0.2), rgba(169, 110, 255, 0.1));
    border-radius: 20px;
    padding: 1rem 1.5rem;
    border-left: 4px solid var(--primary);
    font-size: 0.9rem;
    color: var(--text-primary);
    animation: slideIn 0.4s ease;
}

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

.manga-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.manga-card {
    background: rgba(22, 28, 46, 0.8);
    backdrop-filter: blur(8px);
    border-radius: 28px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    box-shadow: 0 10px 20px -10px black;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

.manga-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 35px -12px rgba(255, 94, 124, 0.3);
    border-color: var(--primary);
}

.manga-cover {
    width: 100%;
    height: 270px;
    object-fit: cover;
    transition: transform 0.5s;
}

.manga-card:hover .manga-cover {
    transform: scale(1.05);
}

.card-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    justify-content: space-between;
    z-index: 5;
    pointer-events: none;
}

.chip-date {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    padding: 0.2rem 0.8rem;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #ccc;
}

.status-chip {
    padding: 0.2rem 0.8rem;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    background: var(--primary);
    color: white;
}

.status-reading { background: #2edfa0; color: #1a1a2e; }
.status-completed { background: #6e8cff; }
.status-planned { background: #ffcd6b; color: #1a1a2e; }
.status-dropped { background: #ff5e7c; }

.manga-info {
    padding: 1rem;
}

.manga-title {
    font-weight: 700;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.5rem;
}

.meta-row {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin: 0.6rem 0;
}

.meta-row span i {
    margin-right: 0.3rem;
}

.progress-track {
    height: 5px;
    background: rgba(45, 50, 72, 0.8);
    border-radius: 10px;
    margin: 0.7rem 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 10px;
    width: 0%;
    transition: width 0.3s;
}

.action-btns {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.7rem;
}

.action-icon {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0.3rem;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-icon:hover {
    color: var(--primary);
    transform: scale(1.2);
    background: rgba(255, 94, 124, 0.2);
}

.empty-dashboard {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--text-secondary);
}

.empty-dashboard i {
    font-size: 4rem;
    color: #333856;
    margin-bottom: 1rem;
    animation: float 3s infinite;
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
    animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.stats-deep {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.deep-card {
    flex: 1;
    background: rgba(22, 28, 46, 0.6);
    border-radius: 28px;
    padding: 1.2rem;
    text-align: center;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.deep-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.deep-card i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    display: block;
}

.deep-value {
    font-size: 1.8rem;
    font-weight: 700;
    display: block;
    color: white;
}

.deep-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

.chart-box {
    background: rgba(10, 14, 24, 0.6);
    padding: 1.5rem;
    border-radius: 36px;
    margin-top: 1.5rem;
}

.import-export-section {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: flex-end;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(3, 5, 11, 0.95);
    backdrop-filter: blur(15px);
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s;
}

.modal-card {
    max-width: 800px;
    width: 90%;
    border-radius: 48px;
    padding: 2rem;
    animation: modalPop 0.35s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

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

.modal-header h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.modal-header h3 i {
    color: var(--primary);
    margin-right: 0.5rem;
}

.close-modal-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.close-modal-btn:hover {
    background: var(--primary);
    color: white;
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-flex {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.modal-cover-wrapper {
    flex-shrink: 0;
}

.modal-cover {
    width: 160px;
    height: 220px;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: 0 10px 25px black;
}

.modal-form {
    flex: 1;
    min-width: 200px;
}

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

.form-group label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin-bottom: 0.3rem;
    letter-spacing: 0.5px;
}

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group.half {
    flex: 1;
    margin-bottom: 0;
}

.date-row {
    display: flex;
    gap: 0.8rem;
}

.form-control, .form-select {
    background: rgba(30, 38, 58, 0.9);
    border: 1px solid var(--border-light);
    border-radius: 30px;
    padding: 0.7rem 1rem;
    width: 100%;
    color: white;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 94, 124, 0.3);
}

.form-control[disabled] {
    opacity: 0.7;
    cursor: not-allowed;
}

.modal-search {
    width: 100%;
}

.btn {
    border: none;
    padding: 0.7rem 1.8rem;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 94, 124, 0.4);
}

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

.btn-outline:hover {
    border-color: var(--primary);
    background: rgba(255, 94, 124, 0.1);
    transform: translateY(-2px);
}

.btn-danger {
    background: rgba(255, 94, 124, 0.2);
    border: 1px solid #ff5e7c;
    color: #ff5e7c;
}

.btn-danger:hover {
    background: #ff5e7c;
    color: white;
}

.footer-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.floating-add {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--grad-1);
    color: white;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 10px 30px rgba(255, 94, 124, 0.5);
    border: none;
    cursor: pointer;
    z-index: 150;
    transition: all 0.3s;
}

.floating-add:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 15px 40px rgba(255, 94, 124, 0.7);
}

.scroll-to-top {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--grad-1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(255, 94, 124, 0.5);
    transition: all 0.3s;
    z-index: 140;
    display: flex;
    align-items: center;
    justify-content: center;
    display: none;
}

.scroll-to-top:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 40px rgba(255, 94, 124, 0.7);
}

.toast-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: rgba(22, 28, 46, 0.95);
    backdrop-filter: blur(12px);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-size: 0.85rem;
    border-left: 4px solid var(--primary);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    animation: toastSlide 0.3s ease;
}

.toast.success { border-left-color: #2edfa0; }
.toast.error { border-left-color: #ff5e7c; }
.toast.info { border-left-color: var(--primary); }

@keyframes toastSlide {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(22, 28, 46, 0.5);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

::selection {
    background: rgba(255, 94, 124, 0.3);
    color: white;
}

@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .side-panel {
        position: relative;
        top: 0;
    }
    .container {
        padding: 1rem;
    }
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .year-slider-container {
        flex-direction: column;
        align-items: stretch;
    }
    .form-row {
        flex-direction: column;
        gap: 1rem;
    }
    .form-group.half {
        margin-bottom: 1rem;
    }
}

@media (max-width: 550px) {
    .manga-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
    .search-wrapper {
        width: 100%;
    }
    .dashboard-header {
        flex-direction: column;
        align-items: stretch;
    }
    .floating-add {
        width: 55px;
        height: 55px;
        font-size: 1.5rem;
    }
    .scroll-to-top {
        width: 45px;
        height: 45px;
        bottom: 95px;
    }
    .modal-flex {
        flex-direction: column;
        align-items: center;
    }
    .modal-cover {
        width: 130px;
        height: 180px;
    }
}