/* Base styles */
:root {
    /* Primary color palette */
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: rgba(99, 102, 241, 0.1);
    
    /* Secondary color */
    --secondary-color: #10b981;
    --secondary-hover: #059669;
    
    /* Accent colors */
    --accent-color: #8b5cf6;
    --accent-hover: #7c3aed;
    --danger-color: #ef4444;
    --danger-hover: #dc2626;
    
    /* Background colors */
    --background-dark: #0f172a;
    --surface-dark: #1e293b;
    --surface-darker: #172033;
    --surface-lighter: #334155;
    
    /* Text colors */
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    
    /* Border and shadow */
    --border-color: #334155;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
    --hover-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    /* Transitions */
    --hover-transition: all 0.2s ease;
    --fast-transition: all 0.15s ease;
    
    /* Border radius */
    --border-radius-sm: 0.375rem;
    --border-radius: 0.5rem;
    --border-radius-lg: 0.75rem;
    --border-radius-xl: 1rem;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    background-color: var(--background-dark);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* Navigation */
nav {
    background-color: var(--surface-dark);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    padding: var(--spacing-md) 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.brand {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    transition: var(--hover-transition);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.brand i {
    font-size: 1.75rem;
    color: var(--primary-color);
}

.brand:hover {
    color: var(--primary-hover);
    transform: translateY(-1px);
}

section {
    margin: var(--spacing-xl) 0;
}

h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    position: relative;
    padding-bottom: var(--spacing-sm);
}

h2::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
}

/* Updates Grid */
.updates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.update-card {
    background-color: var(--surface-dark);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--hover-transition);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    height: 100%;
}

.update-content {
    display: flex;
    padding: var(--spacing-md);
    flex: 1;
    gap: var(--spacing-md);
}

.update-cover {
    width: 80px;
    height: 120px;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.update-cover .cover-link {
    display: block;
    width: 100%;
    height: 100%;
    transition: var(--hover-transition);
    position: relative;
}

.update-cover .cover-link:hover {
    transform: scale(1.05);
}

.update-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius-sm);
    transition: var(--hover-transition);
}

.update-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    gap: var(--spacing-xs);
}

.update-text {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.update-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    margin: 0 0 var(--spacing-xs) 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.update-meta {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    margin-top: auto;
    font-size: 0.85rem;
}

.update-chapter {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.update-date {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.update-card .btn {
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    border-radius: 0;
    padding: var(--spacing-md);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    background-color: var(--surface-darker);
    color: var(--primary-color);
    transition: var(--hover-transition);
    text-decoration: none;
}

.update-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--hover-shadow);
    border-color: var(--primary-light);
}

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

.update-card .btn:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Manga Grid */
.manga-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--spacing-lg);
}

.manga-card {
    background-color: var(--surface-dark);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--hover-transition);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
}

.manga-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--hover-shadow);
    border-color: var(--primary-light);
}

.manga-cover {
    position: relative;
    padding-top: 150%;
    overflow: hidden;
}

.cover-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    transition: var(--hover-transition);
}

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

.manga-cover img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--hover-transition);
}

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

.manga-info {
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    flex: 1;
}

.manga-title {
    font-weight: 600;
    font-size: 1rem;
    margin: 0;
    line-height: 1.3;
}

.manga-title-link {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--hover-transition);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
}

.manga-title-link:hover {
    color: var(--primary-color);
}

.manga-chapter {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: var(--spacing-xs) 0;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.manga-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: auto;
}

.manga-actions {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
}

.manga-actions .btn {
    flex: 1;
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
}

.manga-actions .btn i {
    font-size: 0.9rem;
}

/* Buttons */
.btn {
    background-color: var(--surface-lighter);
    color: var(--text-primary);
    border: none;
    border-radius: var(--border-radius);
    padding: var(--spacing-sm) var(--spacing-md);
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--hover-transition);
    text-align: center;
    font-weight: 500;
    outline: none;
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: var(--surface-lighter);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background-color: var(--surface-dark);
    transform: translateY(-1px);
}

.update-card .btn {
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    border-radius: 0;
    padding: var(--spacing-md);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    background-color: var(--surface-darker);
    color: var(--primary-color);
    transition: var(--hover-transition);
    text-decoration: none;
}

/* Loading State */
.loading {
}

/* Error Message */
.error-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    background: var(--surface-dark);
    border-radius: 12px;
    border: 1px solid #f87171;
    color: var(--text-primary);
}

/* Responsive adjustments */
@media (max-width: 1400px) {
    .updates-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width: 1200px) {
    .updates-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .updates-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .updates-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .manga-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .updates-grid {
        grid-template-columns: repeat(1, 1fr);
    }
    
    .manga-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Icon styles */
.fas, .far {
    margin-right: 0.5rem;
}

h2 .fas {
    font-size: 1.25rem;
    color: var(--primary-color);
}

.update-meta .fas,
.update-meta .far,
.manga-chapter .fas,
.manga-date .far {
    font-size: 0.9rem;
    width: 1rem;
    text-align: center;
}

.btn .fas {
    margin-right: 0.35rem;
}

/* Add these styles for the new chapter indicator */
.new-chapter {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.new-chapter::after {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    background-color: #4ade80; /* Green color */
    border-radius: 50%;
    margin-left: 0.5rem;
    box-shadow: 0 0 8px #4ade80;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(74, 222, 128, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(74, 222, 128, 0);
    }
}

/* Manga Controls */
.manga-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--surface-dark);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.search-box {
    width: 300px;
    position: relative;
    flex-shrink: 0;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    background: var(--background-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: var(--hover-transition);
}

.filters-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}

#manga-status-filter,
#manga-sort {
    background: var(--background-dark);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem 2rem 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    appearance: none;
    width: 140px;
    transition: var(--hover-transition);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23565f89' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
}

.add-manga-btn {
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    border-radius: 8px;
    transition: var(--hover-transition);
    background: var(--primary-color);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Media queries for responsiveness */
@media (max-width: 768px) {
    .manga-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .search-box {
        width: auto;
        max-width: 93%;
    }

    .search-box input {
        width: 93%;
        max-width: none;
    }

    .filters-container {
        margin-left: 0;
        justify-content: space-between;
        width: 100%;
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    #manga-status-filter,
    #manga-sort {
        flex: 1;
        min-width: 120px;
        max-width: 160px;
    }

    .add-manga-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .manga-controls {
        padding: 0.75rem;
    }

    .search-box {
        width: 92%;
    }

    .filters-container {
        flex-direction: column;
        align-items: stretch;
    }

    #manga-status-filter,
    #manga-sort {
        width: 100%;
        max-width: none;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    backdrop-filter: blur(4px);
    overflow-y: auto;
    padding: 2rem 1rem;
}

.modal.active {
    display: block;
}

.modal-content {
    background: var(--surface-dark);
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    margin: 0 auto;
    position: relative;
}

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

.modal-header h3 {
    margin: 0;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
}

.modal-header h3 i {
    color: var(--primary-color);
}

.close-modal {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: var(--hover-transition);
}

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

.modal-body {
    padding: 1rem;
}

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

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
    font-weight: 500;
}

.form-group label i {
    color: var(--primary-color);
    width: 1rem;
    text-align: center;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: var(--background-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: var(--hover-transition);
    box-sizing: border-box;
}

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

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.modal-actions .btn {
    min-width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.add-manga-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Add these styles to your existing form styles */
.form-group input[type="datetime-local"] {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--background-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: var(--hover-transition);
    box-sizing: border-box;
}

.form-group input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    filter: invert(0.7); /* Makes the calendar icon light colored */
    cursor: pointer;
}

/* Make textarea smaller */
.form-group textarea {
    min-height: 60px;
    resize: vertical;
}

/* Delete button styles */
.manga-cover {
    position: relative;
}

.delete-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: var(--hover-transition);
}

.delete-btn i {
    font-size: 1rem;
    color: #f87171; /* Red color */
    margin: 0;
}

.manga-card:hover .delete-btn {
    opacity: 1;
}

.delete-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

/* Success message styles */
.success-message {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--surface-dark);
    color: var(--text-primary);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 1000;
    animation: slideDown 0.3s ease-out;
}

.success-message i {
    color: #4ade80;
    font-size: 1.25rem;
}

@keyframes slideDown {
    from {
        transform: translate(-50%, -100%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

/* Section header with counter */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.manga-count {
    background: var(--surface-dark);
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 1rem;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.manga-count i {
    color: var(--primary-color);
    font-size: 1.25rem;
}

.manga-count span {
    color: var(--text-primary);
}

#mangaCounter {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.25rem;
}

.manga-title-link {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--hover-transition);
    display: block;
}

.manga-title-link:hover {
    color: var(--primary-color);
}

/* Update existing manga-title styles */
.manga-title {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    font-weight: 600;
}

/* Stats Section */
.stats-section {
    margin: 2rem 0;
}

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

.refresh-stats-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    white-space: nowrap;
}

.refresh-stats-btn i {
    font-size: 0.9rem;
}

.refresh-stats-btn.pulse {
    animation: pulse 2s ease-in-out infinite;
}

.refresh-stats-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.refresh-stats-btn i.fa-spin {
    animation: spin 1s linear infinite;
}

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

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.stats-grid {
    display: grid;
    gap: 1.5rem;
}

.stats-numbers {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}

.stats-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.stat-card {
    background: var(--surface-dark);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid var(--border-color);
    transition: var(--hover-transition);
    position: relative;
    overflow: hidden;
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(122, 162, 247, 0.15);
}

.stat-icon i {
    font-size: 1.1rem;
    color: white;
}

.stat-content {
    width: 100%;
}

.stat-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.stat-header i {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin: 0;
}

.warning-card .stat-header i {
    color: #fbbf24;
}

.danger-card .stat-header i {
    color: #ef4444;
}

.stat-header span {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.warning-card .stat-icon {
    background: #fbbf24;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.15);
}

.danger-card .stat-icon {
    background: #ef4444;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}

.stats-details .stat-card {
    padding: 1rem;
}

.stats-details .stat-value {
    font-size: 1.1rem;
}

.stats-details .stat-title {
    font-size: 1rem;
    color: var(--text-primary);
}

/* Add hover effect */
.stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .stats-numbers {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .stats-details {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .stats-numbers {
        grid-template-columns: 1fr;
    }
}

/* Update these styles for inline stats */
.stat-value-container {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Special styling for details cards */
.stats-details .stat-value {
    font-size: 1.1rem;
}

.stats-details .stat-subtitle {
    margin-top: 0.25rem;
    display: block;  /* Keep subtitles on new line for detail cards */
}

/* Manga Status Styles */
.manga-status {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-right: 0.5rem;
}

.manga-status.ongoing {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.manga-status.completed {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.manga-status.hiatus {
    background: rgba(234, 179, 8, 0.1);
    color: #eab308;
}

.manga-status.abandoned {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Filter Controls */
.filter-box select {
    background: var(--background-dark);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: var(--hover-transition);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23565f89' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1rem;
    min-width: 100px;
}

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

.filter-box select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(122, 162, 247, 0.1);
}

.filter-box select option {
    background-color: var(--surface-dark);
    color: var(--text-primary);
    padding: 0.5rem;
}

.status-select {
    background-color: var(--background-dark);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.35rem 2rem 0.35rem 0.75rem;
    font-size: 0.85rem;
    cursor: pointer;
    appearance: none;
    transition: var(--hover-transition);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23565f89' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1rem;
}

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

.status-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(122, 162, 247, 0.1);
}

.status-select option {
    background-color: var(--surface-dark);
    color: var(--text-primary);
    padding: 0.5rem;
}

.status-select:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px rgba(122, 162, 247, 0.1);
}

.status-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(122, 162, 247, 0.2);
}

/* Status wrapper adjustments */
.status-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-select {
    width: 60%;
    padding: 0.35rem 0.5rem;
    font-size: 0.85rem;
    background-color: var(--surface-dark);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    padding-right: 2rem;
    cursor: pointer;
}

.status-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.status-select:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.status-loading {
    display: none;
    font-size: 0.85rem;
    color: var(--primary-color);
    animation: spin 1s linear infinite;
    position: absolute;
    right: -0rem;
    top: 25%;
    transform: translateY(-50%);
}

@keyframes spin {
    from { transform: translateY(-50%) rotate(0deg); }
    to { transform: translateY(-50%) rotate(360deg); }
}

/* Form select styling */
.form-control {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: var(--surface-dark);
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: var(--hover-transition);
}

.form-control:hover {
    border-color: var(--text-muted);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(122, 162, 247, 0.1);
}

/* Specific select element styling */
select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a9b1d6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1rem;
    padding-right: 2rem;
}

/* Add/Update these styles */
.filters-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-radius: 8px;
}

.filters-container select {
    background: var(--background-dark);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.35rem 2rem 0.35rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a9b1d6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1rem;
}

.filters-container select:hover {
    border-color: var(--text-muted);
}

.filters-container select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.filters-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.manga-link {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--hover-transition);
}

.manga-link:hover {
    color: var(--primary-color);
}

/* Skeleton Loading Animation */
@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: 200px 0;
    }
}

.stats-section.loading .stat-value,
.stats-section.loading .stat-subtitle {
    color: transparent;
    position: relative;
}

.stats-section.loading .stat-value::after,
.stats-section.loading .stat-subtitle::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        var(--surface-dark) 0%,
        var(--border-color) 20%,
        var(--surface-dark) 40%
    );
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite linear;
}

/* Keep the text height consistent */
.stats-section.loading .stat-value {
    display: inline-block;
    min-width: 3rem;
}

.stats-section.loading .stats-details .stat-value {
    min-width: 8rem;
}

.stats-section.loading .stat-subtitle {
    display: inline-block;
    min-width: 5rem;
}

/* Recent Updates Skeleton Loading */
.updates-grid.loading .update-card {
    position: relative;
    height: 120px;
}

.updates-grid.loading .update-cover,
.updates-grid.loading .update-title,
.updates-grid.loading .update-chapter,
.updates-grid.loading .update-date,
.updates-grid.loading .btn {
    position: relative;
    overflow: hidden;
    background: var(--surface-dark);
}

.updates-grid.loading .update-cover::after,
.updates-grid.loading .update-title::after,
.updates-grid.loading .update-chapter::after,
.updates-grid.loading .update-date::after,
.updates-grid.loading .btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        var(--surface-dark) 0%,
        var(--border-color) 20%,
        var(--surface-dark) 40%
    );
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite linear;
}

.updates-grid.loading .update-title {
    height: 1.2rem;
    width: 80%;
    margin-bottom: 0.5rem;
}

.updates-grid.loading .update-chapter {
    height: 1rem;
    width: 60%;
    margin-bottom: 0.25rem;
}

.updates-grid.loading .update-date {
    height: 0.9rem;
    width: 40%;
}

.updates-grid.loading .btn {
    width: 90%;
    height: 2rem;
    margin: auto;
}

/* Manga Grid Skeleton Loading */
.manga-grid.loading .manga-card {
    height: 360px;
    background: var(--surface-dark);
}

.manga-grid.loading .manga-cover {
    position: relative;
    padding-top: 140%;
    background: var(--surface-dark);
    overflow: hidden;
}

.manga-grid.loading .manga-title,
.manga-grid.loading .status-placeholder,
.manga-grid.loading .manga-chapter,
.manga-grid.loading .manga-date,
.manga-grid.loading .btn-placeholder {
    position: relative;
    overflow: hidden;
    background: var(--surface-dark);
}

.manga-grid.loading .manga-cover::after,
.manga-grid.loading .manga-title::after,
.manga-grid.loading .status-placeholder::after,
.manga-grid.loading .manga-chapter::after,
.manga-grid.loading .manga-date::after,
.manga-grid.loading .btn-placeholder::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        var(--surface-dark) 0%,
        var(--border-color) 20%,
        var(--surface-dark) 40%
    );
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite linear;
}

.manga-grid.loading .manga-title {
    height: 1.2rem;
    width: 90%;
    margin-bottom: 0.75rem;
}

.manga-grid.loading .status-placeholder {
    height: 1.5rem;
    width: 70%;
    margin-bottom: 0.5rem;
}

.manga-grid.loading .manga-chapter {
    height: 1rem;
    width: 60%;
    margin-bottom: 0.5rem;
}

.manga-grid.loading .manga-date {
    height: 0.9rem;
    width: 50%;
    margin-bottom: 1rem;
}

.manga-grid.loading .btn-placeholder {
    height: 2rem;
    border-radius: 8px;
}

.manga-grid.loading .manga-actions {
    display: flex;
    gap: 0.5rem;
}

.manga-grid.loading .btn-placeholder {
    flex: 1;
}

/* Footer Styles */
.site-footer {
    margin-top: 4rem;
    padding: 2rem 0;
    background: var(--surface-dark);
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-section h4 i {
    color: var(--primary-color);
}

.footer-section p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-section ul li i {
    color: var(--primary-color);
    width: 1rem;
    text-align: center;
}

.footer-bottom {
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-bottom a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--hover-transition);
}

.footer-bottom a:hover {
    color: var(--primary-hover);
}

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

/* Ninja icon animation */
.ninja-icon {
    color: var(--primary-color);
    transition: all 0.3s ease;
    animation: ninjaColors 5s infinite;
    display: inline-block;
    margin: 0;
}

@keyframes ninjaColors {
    0% { color: #7aa2f7; }  /* Your primary blue */
    25% { color: #f7768e; } /* Red */
    50% { color: #9ece6a; } /* Green */
    75% { color: #e0af68; } /* Orange */
    100% { color: #7aa2f7; } /* Back to blue */
}

.footer-bottom:hover .ninja-icon {
    transform: scale(1.2) rotate(360deg);
}

.footer-bottom p i {
    margin: 0;
}

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

.last-check-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

.last-check-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.last-check-badge.success {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.last-check-badge.error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.last-check-badge.running {
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
}

/* Task Results Section */
.task-results {
    margin: var(--spacing-xl) 0;
}

.task-results-card {
    background-color: var(--surface-dark);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    padding: var(--spacing-lg);
    box-shadow: var(--card-shadow);
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
}

.task-status {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.task-duration {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.task-duration i {
    color: var(--primary-color);
}

.task-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
}

.task-stat {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background-color: var(--surface-darker);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
}

.task-stat i {
    font-size: 1.5rem;
    color: var(--primary-color);
    width: 2rem;
    text-align: center;
}

.task-stat > div {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.task-stat .stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.task-stat .stat-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.task-error {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
    padding: var(--spacing-md);
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--border-radius-sm);
    color: #ef4444;
}

.task-error i {
    font-size: 1.2rem;
}

.task-error span {
    font-size: 0.9rem;
    line-height: 1.4;
}

.manga-meta .status-select {
    background-color: var(--surface-dark);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.35rem 2rem 0.35rem 0.75rem;
    font-size: 0.85rem;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: var(--hover-transition);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23565f89' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1rem;
    min-width: 120px;
}

.manga-meta .status-select:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px rgba(122, 162, 247, 0.1);
}

.manga-meta .status-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(122, 162, 247, 0.2);
}

.manga-meta .status-select option {
    background-color: var(--surface-dark);
    color: var(--text-primary);
    padding: 0.5rem;
}