.page-header {
    max-width: 1400px;
    margin: 0 auto 3rem auto;
    padding: 0 1rem;
}

.page-header-content {
    text-align: left;
    padding: 1rem 0;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    font-size: 1rem;
    color: #64748b;
    font-weight: 500;
}

.manhwa-count {
    font-size: 1rem;
    font-weight: 700;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.15);
    color: #475569;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.manhwa-menu-section {
    max-width: 1000px;
    margin: 0 auto 3rem auto;
    padding: 1.5rem 2rem;
    
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 20px;
    
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.03),
        0 2px 8px rgba(0, 0, 0, 0.02);
    
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.manhwa-grid-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem 4rem;
}

.manhwa-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
    align-items: start;
}

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

@media (max-width: 768px) {
    .manhwa-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
}

.manhwa-card {
    background: white;
    border-radius: 18px;
    
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 0;
    
    overflow: hidden;
    
    border: 1px solid rgba(148, 163, 184, 0.08);
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.06),
        0 2px 8px rgba(0, 0, 0, 0.04),
        0 1px 3px rgba(0, 0, 0, 0.03);
    
    
    min-height: 260px;

    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.filter-empty-state {
    opacity: 0;
    transform: translateY(0);
    transition: opacity 0.2s ease, transform 0.3s ease;
}

.manhwa-card-wrapper {
    display: contents;
}

.manhwa-card-wrapper.is-hidden {
    display: none;
}

.manhwa-card:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 12px 32px rgba(0, 0, 0, 0.1),
        0 6px 16px rgba(0, 0, 0, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.06);
    border-color: rgb(148, 163, 184);
}

.manhwa-card-image {
    width: 200px;
    height: 100%;
    min-height: 260px;
    overflow: hidden;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    position: relative;
}

.manhwa-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* .manhwa-card:hover .manhwa-card-image img {
    transform: scale(1.05);
} */

.manhwa-card-image .image-placeholder {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #94a3b8;
    font-weight: 600;
}

.manhwa-card-image .image-placeholder span:first-child {
    font-size: 2.5rem;
}

.manhwa-card-content {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    justify-content: flex-start;
    min-height: 260px;
}

.manhwa-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.manhwa-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.6;
    color: #0f172a;
    
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    
    flex: 1;
    word-break: break-word;
}

.manhwa-card-header .status-badge {
    flex-shrink: 0;
}

.manhwa-card-progress {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.progress-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
}

.progress-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: #334155;
}

.manhwa-card-meta {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
}

.meta-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    
    padding: 0.75rem;
    background: rgba(148, 163, 184, 0.04);
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.08);
}

.meta-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    line-height: 1;
}

.meta-content {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    flex: 1;
    min-width: 0;
}

.meta-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #64748b;
}

.meta-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.meta-value.is-empty {
    color: #94a3b8;
    font-style: italic;
    font-weight: 500;
}

.manhwa-card-notes {
    padding: 0.75rem;
    background: rgba(59, 130, 246, 0.04);
    border-left: 3px solid #200e43;
    border-radius: 6px;
    flex: 1;
}

.manhwa-card-notes p {
    font-size: 0.85rem;
    line-height: 1.5;
    color: #475569;
    margin: 0;
}

.manhwa-card-notes p.is-empty {
    color: #94a3b8;
    font-style: italic;
}

.manhwa-card-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
}

.card-delete-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;

    padding: 0.5rem 1rem;

    background: rgba(239, 68, 68, 0.08);
    color: #dc2626;

    font-size: 0.82rem;
    font-weight: 600;
    font-family: inherit;

    border: 1px solid rgba(239, 68, 68, 0.15);
    border-radius: 8px;

    cursor: pointer;

    transition: all 0.2s ease;
}

.card-delete-btn:hover {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
    transform: translateY(-1px);
}

.card-delete-btn i {
    font-size: 0.8rem;
}

.card-edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;

    padding: 0.5rem 1rem;

    background: rgba(148, 163, 184, 0.08);
    color: #64748b;

    font-size: 0.82rem;
    font-weight: 600;
    font-family: inherit;

    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 8px;

    cursor: pointer;

    transition: all 0.2s ease;
}

.card-edit-btn:hover {
    background: rgba(59, 130, 246, 0.08);
    color: #3b82f6;
    border-color: rgba(59, 130, 246, 0.25);
    transform: translateY(-1px);
}

.card-edit-btn i {
    font-size: 0.8rem;
}

.manhwa-card-add {
    grid-column: span 1;
    
    background: rgba(59, 130, 246, 0.04);
    border: 2px dashed rgba(59, 130, 246, 0.3);
    border-radius: 18px;
    
    min-height: 220px;
    
    display: flex;
    align-items: center;
    justify-content: center;
    
    text-decoration: none;
    color: #3b82f6;
    
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    cursor: pointer;
}

.manhwa-card-add:hover {
    background: rgba(59, 130, 246, 0.08);
    border-color: #3b82f6;
    border-style: solid;
    transform: translateY(-4px);
    box-shadow: 
        0 8px 24px rgba(59, 130, 246, 0.15),
        0 4px 12px rgba(59, 130, 246, 0.1);
}

.add-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.add-icon {
    width: 60px;
    height: 60px;
    
    display: flex;
    align-items: center;
    justify-content: center;
    
    font-size: 2.5rem;
    font-weight: 300;
    
    background: rgba(59, 130, 246, 0.1);
    border-radius: 50%;
    
    transition: all 0.3s ease;
}

.manhwa-card-add:hover .add-icon {
    background: #3b82f6;
    color: white;
    transform: rotate(90deg);
}

.add-text {
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.empty-state-large {
    text-align: center;
    padding: 5rem 2rem;
    
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.empty-icon {
    font-size: 5rem;
    opacity: 0.5;
}

.empty-state-large h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.empty-state-large p {
    font-size: 1rem;
    color: #64748b;
    margin: 0;
    max-width: 400px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    
    padding: 0.875rem 1.75rem;
    
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    
    font-size: 0.95rem;
    font-weight: 600;

    border-radius: 12px;
    text-decoration: none;
    
    box-shadow: 
        0 4px 12px rgba(59, 130, 246, 0.25),
        0 2px 6px rgba(59, 130, 246, 0.15);
    
    transition: all 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 16px rgba(59, 130, 246, 0.3),
        0 4px 8px rgba(59, 130, 246, 0.2);
}

@media (max-width: 1200px) {
    .page-title {
        font-size: 2.25rem;
    }
    
    .manhwa-card {
        grid-template-columns: 180px 1fr;
    }
    
    .manhwa-card-image {
        width: 180px;
        min-height: 240px;
    }
    
    .manhwa-card-content {
        padding: 1.5rem;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .page-header {
        margin-bottom: 2rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .manhwa-menu-section {
        padding: 1.25rem 1rem;
        margin-bottom: 2rem;
    }
    
    .manhwa-grid-container {
        padding: 0 0.75rem 3rem;
    }

    .manhwa-card {
        grid-template-columns: 1fr;
        grid-template-rows: 200px auto;
    }
    
    .manhwa-card-image {
        width: 100%;
        min-height: 200px;
    }
    
    .manhwa-card-content {
        padding: 1rem;
    }
    
    .manhwa-card-title {
        font-size: 1rem;
    }
    
    .manhwa-card-meta {
        gap: 0.5rem;
    }
    
    .meta-item {
        padding: 0.5rem;
    }
}

.manhwa-card:focus-visible,
.manhwa-card-add:focus-visible {
    outline: 3px solid #3b82f6;
    outline-offset: 3px;
}

@media print {
    .manhwa-menu-section,
    .manhwa-card-add {
        display: none;
    }
    
    .manhwa-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

.add-form-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
    
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    
    padding: 2rem 1rem 0;
    max-height: 100vh;
    overflow-y: auto;
}

.add-form-container.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.add-form-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    
    background: white;
    border-radius: 24px 24px 0 0;
    
    box-shadow: 
        0 -8px 32px rgba(0, 0, 0, 0.12),
        0 -4px 16px rgba(0, 0, 0, 0.08);
    
    overflow: hidden;
}

.add-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    
    padding: 2rem 2.5rem;
    
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.edit-form-header {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-bottom-color: rgba(245, 158, 11, 0.15);
}

.edit-form-header .add-form-title {
    color: #92400e;
}

.add-form-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.5px;
    margin: 0;
}

.form-close-btn {
    width: 40px;
    height: 40px;
    
    display: flex;
    align-items: center;
    justify-content: center;
    
    background: rgba(148, 163, 184, 0.1);
    border: none;
    border-radius: 10px;
    
    color: #64748b;
    cursor: pointer;
    
    transition: all 0.2s ease;
}

.form-close-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    transform: scale(1.05);
}

.add-manhwa-form {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    align-items: start;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group-wide {
    grid-column: span 2;
}

.form-group-full {
    grid-column: 1 / -1;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 700;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-label .required {
    color: #ef4444;
    margin-left: 0.2rem;
}

.form-helper {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
}

.form-helper.warning {
    color: #f59e0b;
}

.form-helper.error {
    color: #ef4444;
}

.form-input,
.form-select,
.form-textarea {
    padding: 0.875rem 1.25rem;
    
    font-size: 0.95rem;
    font-family: inherit;
    
    border: 1.5px solid rgba(148, 163, 184, 0.25);
    border-radius: 12px;
    
    background: white;
    color: #0f172a;
    
    outline: none;
    
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #94a3b8;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: #3b82f6;
    box-shadow: 
        0 0 0 4px rgba(59, 130, 246, 0.08),
        0 4px 12px rgba(59, 130, 246, 0.08);
    transform: translateY(-1px);
}

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2364748b' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 3rem;
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
    line-height: 1.6;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    
    padding-top: 1rem;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    margin-top: 0.5rem;
}

.btn-secondary {
    padding: 0.875rem 1.75rem;
    
    background: rgba(148, 163, 184, 0.1);
    color: #475569;
    
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: 12px;
    
    cursor: pointer;
    
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(148, 163, 184, 0.15);
    transform: translateY(-1px);
}

.btn-submit {
    padding: 0.875rem 1.75rem;
    
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: 12px;
    
    cursor: pointer;
    
    display: flex;
    align-items: center;
    gap: 0.5rem;
    
    box-shadow: 
        0 4px 12px rgba(59, 130, 246, 0.25),
        0 2px 6px rgba(59, 130, 246, 0.15);
    
    transition: all 0.2s ease;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 16px rgba(59, 130, 246, 0.3),
        0 4px 8px rgba(59, 130, 246, 0.2);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit svg {
    transition: transform 0.2s ease;
}

.btn-submit:hover svg {
    transform: rotate(90deg);
}

.btn-update {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 
        0 4px 12px rgba(245, 158, 11, 0.25),
        0 2px 6px rgba(245, 158, 11, 0.15);
}

.btn-update:hover {
    box-shadow: 
        0 6px 16px rgba(245, 158, 11, 0.3),
        0 4px 8px rgba(245, 158, 11, 0.2);
}

.form-input:invalid:not(:placeholder-shown),
.form-select:invalid:not(:placeholder-shown) {
    border-color: rgba(239, 68, 68, 0.5);
}

.form-input:valid:not(:placeholder-shown),
.form-select:valid {
    border-color: rgba(16, 185, 129, 0.5);
}

.delete-modal-container {
    position: fixed;
    inset: 0;
    z-index: 300;
    opacity: 0;
    pointer-events: none;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    transition: opacity 0.2s ease;
}

.delete-modal-container.active {
    opacity: 1;
    pointer-events: auto;
}

.delete-modal {
    background: white;
    border-radius: 16px;
    
    max-width: 440px;
    width: 100%;
    
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.15),
        0 10px 20px rgba(0, 0, 0, 0.1);

    transform: scale(0.95);
    transition: transform 0.2s ease;
}

.delete-modal-container.active .delete-modal {
    transform: scale(1);
}

.delete-modal-header {
    padding: 2rem 2rem 1rem;
    
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    
    text-align: center;
}

.delete-modal-header i {
    font-size: 3rem;
    color: #ef4444;
}

.delete-modal-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.delete-modal-body {
    padding: 0 2rem 1.5rem;
    text-align: center;
}

.delete-modal-body p {
    font-size: 0.95rem;
    color: #475569;
    line-height: 1.6;
    margin: 0 0 0.75rem 0;
}

.delete-modal-body strong {
    color: #0f172a;
    font-weight: 700;
}

.delete-warning {
    font-size: 0.85rem;
    color: #94a3b8;
    font-style: italic;
}

.delete-modal-actions {
    display: flex;
    gap: 0.75rem;
    padding: 1.5rem 2rem 2rem;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.delete-modal-actions button {
    flex: 1;
}

.btn-delete {
    padding: 0.875rem 1.75rem;
    
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: 12px;
    
    cursor: pointer;
    
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    
    box-shadow: 
        0 4px 12px rgba(239, 68, 68, 0.25),
        0 2px 6px rgba(239, 68, 68, 0.15);
    
    transition: all 0.2s ease;
}

.btn-delete:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 16px rgba(239, 68, 68, 0.3),
        0 4px 8px rgba(239, 68, 68, 0.2);
}

.btn-delete:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .add-form-container {
        padding: 0;
    }
    
    .add-form-wrapper {
        border-radius: 16px 16px 0 0;
    }
    
    .add-form-header {
        padding: 1.5rem 1.25rem;
    }
    
    .add-form-title {
        font-size: 1.5rem;
    }
    
    .add-manhwa-form {
        padding: 1.5rem 1.25rem;
        gap: 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .form-group-wide,
    .form-group-full {
        grid-column: 1;
    }
    
    .form-actions {
        flex-direction: column-reverse;
    }
    
    .btn-secondary,
    .btn-submit {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    
    .card-delete-btn,
    .card-edit-btn {
        width: 100%;
        justify-content: center;
    }
    
    .delete-modal-actions {
        flex-direction: column-reverse;
    }
}

body.form-open {
    overflow: hidden;
}