:root {
    --bg-color: #0f172a;
    --surface-color: rgba(30, 41, 59, 0.7);
    --border-color: rgba(255, 255, 255, 0.1);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --accent-color: #8b5cf6;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --glass-blur: blur(12px);
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --input-bg: rgba(0, 0, 0, 0.2);
}

body.light-mode {
    --bg-color: #f1f5f9;
    --surface-color: rgba(255, 255, 255, 0.8);
    --border-color: rgba(0, 0, 0, 0.1);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --accent-color: #7c3aed;
    --input-bg: rgba(0, 0, 0, 0.05);
}

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

body {
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.15), transparent 25%);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Glassmorphism Classes */
.glass {
    background: var(--surface-color);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    margin-bottom: 2rem;
    border-radius: 0 0 16px 16px;
    border-top: none;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

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

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 0.45rem 0.85rem;
    border-radius: 8px;
    font-size: 0.9rem;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}

body.light-mode .nav-link {
    color: #475569;
}

body.light-mode .nav-link:hover {
    color: #0f172a;
    background: #f1f5f9;
}

/* Active Nav Link Highlighting */
.nav-link.active {
    color: #ffffff !important;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.35), rgba(37, 99, 235, 0.25)) !important;
    border: 1px solid rgba(96, 165, 250, 0.45) !important;
    font-weight: 600 !important;
    box-shadow: 0 0 14px rgba(59, 130, 246, 0.3);
}

body.light-mode .nav-link.active {
    color: #1d4ed8 !important;
    background: #eff6ff !important;
    border: 1px solid #93c5fd !important;
    font-weight: 600 !important;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.15);
}

/* Container */
.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-weight: 500;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Cards */
.card {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
}

/* Tables */
.table-container {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Badges */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Grid */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-cols-3 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Modals */
.modal {
    display: none; 
    position: fixed; 
    z-index: 100; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0, 0, 0, 0.5); 
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--surface-color);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

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

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    color: var(--text-secondary);
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

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

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.form-group input, .form-group select {
    width: 100%;
    padding: 0.75rem;
    border-radius: 8px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}
.form-group select option {
    background: var(--bg-color);
    color: var(--text-primary);
}

/* Dashboard Redesign Specifics */
.action-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
}
.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--surface-color);
    border: 1px solid var(--danger-color);
    color: var(--danger-color);
    border-radius: 9999px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.2s;
    cursor: pointer;
    text-transform: uppercase;
}
.action-btn:hover {
    background: rgba(239, 68, 68, 0.1);
}
.action-btn.primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
}
.action-btn.primary:hover {
    background: rgba(59, 130, 246, 0.1);
}
.action-btn.warning {
    border-color: #f59e0b;
    color: #f59e0b;
}
.action-btn.warning:hover {
    background: rgba(245, 158, 11, 0.1);
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.filter-group label {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
}
.filter-group input, .filter-group select {
    padding: 0.6rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 1rem;
}
.filter-group input:focus, .filter-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}
.filter-submit {
    align-self: flex-end;
    background: var(--accent-color);
    color: white;
    padding: 0.6rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    width: 40px;
}
.filter-submit:hover {
    background: #6d28d9;
}


/* Universal Filter Controls (Light & Dark Mode Cohesive) */
.filter-input-control {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 0.88rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}
.filter-input-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}
body.light-mode .filter-input-control {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
body.light-mode .filter-input-control:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}
body.light-mode .filter-input-control option {
    background: #ffffff !important;
    color: #0f172a !important;
}
body:not(.light-mode) .filter-input-control {
    background: #1e293b !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #f8fafc !important;
}
body:not(.light-mode) .filter-input-control option {
    background: #0f172a !important;
    color: #f8fafc !important;
}

/* Placeholder Colors */
body.light-mode .filter-input-control::placeholder {
    color: #94a3b8;
}
body:not(.light-mode) .filter-input-control::placeholder {
    color: #64748b;
}

/* Date Picker Calendar Icon */
body:not(.light-mode) input[type="date"].filter-input-control::-webkit-calendar-picker-indicator {
    filter: invert(0.9) brightness(1.2);
    cursor: pointer;
}
body.light-mode input[type="date"].filter-input-control::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.7;
}

/* Date Preset Buttons in Light/Dark Mode */
.date-preset-btn {
    padding: 0.35rem 0.65rem;
    font-size: 0.78rem;
    font-weight: 500;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}
body.light-mode .date-preset-btn {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #475569;
}
body.light-mode .date-preset-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}
body:not(.light-mode) .date-preset-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
}
body:not(.light-mode) .date-preset-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

/* Light mode Pagination Controls */
body.light-mode .pagination-btn {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
}
body.light-mode .pagination-btn:hover:not(.disabled):not(.active) {
    background: #f1f5f9;
    border-color: #3b82f6;
    color: #1e40af;
}
body.light-mode .pagination-btn.disabled {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #94a3b8;
}

.progress-banner {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border-radius: 12px;
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ffffff;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}
.progress-banner.idle-success {
    background: linear-gradient(135deg, #064e3b 0%, #047857 100%) !important;
    border: 1px solid #10b981 !important;
    box-shadow: 0 4px 18px rgba(6, 78, 59, 0.4);
}
.progress-banner.is-busy {
    background: linear-gradient(135deg, #312e81 0%, #1e1b4b 100%) !important;
    border: 1px solid #6366f1 !important;
    box-shadow: 0 4px 18px rgba(49, 46, 129, 0.4);
}
.progress-left {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}
.progress-spinner {
    width: 26px;
    height: 26px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.progress-title {
    font-weight: 800;
    font-size: 1.25rem;
    color: #ffffff !important;
    letter-spacing: -0.01em;
}
.progress-subtitle {
    font-size: 0.92rem;
    color: #f1f5f9 !important;
    font-weight: 500;
    opacity: 1 !important;
    margin-top: 3px;
}
.progress-stats {
    display: flex;
    gap: 2.5rem;
    text-align: center;
}
.progress-stat-value {
    font-size: 2.2rem;
    font-weight: 800;
    color: #ffffff !important;
    line-height: 1;
}
.progress-stat-label {
    font-size: 0.82rem;
    text-transform: uppercase;
    color: #a7f3d0 !important;
    font-weight: 700;
    letter-spacing: 0.05em;
    opacity: 1 !important;
    margin-top: 4px;
}

.story-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.story-card {
    display: flex;
    border-radius: 12px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.2s;
}
.story-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.story-image {
    width: 320px;
    position: relative;
    background: rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.story-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.story-badge-source {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: white;
    color: black;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.story-content {
    flex: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}
.story-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    color: var(--text-secondary);
}
.story-category {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-weight: 600;
}
.story-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    line-height: 1.4;
}
.story-summary {
    background: var(--input-bg);
    padding: 0.85rem 1rem;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-style: normal;
    line-height: 1.55;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}
body.light-mode .story-summary {
    color: #334155;
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
}
.story-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}
.read-article {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.2s;
}
.read-article:hover {
    color: var(--primary-color);
}
.card-actions {
    display: flex;
    gap: 0.5rem;
}
.card-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--border-color);
    background: transparent;
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}
.card-btn:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
}
.card-btn.delete {
    color: var(--danger-color);
    border-color: rgba(239,68,68,0.3);
}
.card-btn.delete:hover {
    background: rgba(239,68,68,0.1);
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}
.page-btn {
    padding: 0.5rem 1rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s;
}
.page-btn:hover {
    background: rgba(255,255,255,0.1);
}
.page-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* Modal Styling */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    padding: 1.5rem;
}
.modal.show {
    opacity: 1;
    pointer-events: auto;
}
.modal-content {
    background: #1e293b;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 100%;
    max-width: 720px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
}
body.light-mode .modal-content {
    background: #ffffff;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}
.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}
.modal-close-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}
.modal-close-btn:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.1);
}
.modal-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.modal-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

#editStoryModal .modal-content,
#previewStoryModal .modal-content {
    max-width: 1100px;
    width: 95vw;
}

#previewStoryModal .modal-content {
    background: #0f172a !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.85) !important;
    color: #ffffff !important;
}
body.light-mode #previewStoryModal .modal-content {
    background: #0f172a !important;
    color: #ffffff !important;
}
#previewStoryModal .modal-header {
    background: #1e293b !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}
#previewStoryModal .modal-title {
    color: #ffffff !important;
}
#previewStoryModal .modal-footer {
    background: #1e293b !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
}
#previewStoryModal #previewSummaryBn,
#previewStoryModal #previewSummaryEn {
    color: #ffffff !important;
}
#previewStoryModal #previewBody {
    background: #030712 !important;
    color: #f8fafc !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}
#previewStoryModal #previewBody::-webkit-scrollbar {
    width: 6px;
}
#previewStoryModal #previewBody::-webkit-scrollbar-track {
    background: #0f172a;
}
#previewStoryModal #previewBody::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}
#previewStoryModal #previewBody::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

@media (max-width: 768px) {
    #editStoryModal .modal-body,
    #previewStoryModal .modal-body {
        grid-template-columns: 1fr !important;
    }
}

/* ==========================================
   Global Custom Confirmation & Alert Modal
   ========================================== */
.custom-modal-backdrop {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(8, 12, 22, 0.78);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s ease;
    padding: 1.5rem;
}

.custom-modal-backdrop.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.custom-modal-card {
    position: relative;
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 22px;
    width: 100%;
    max-width: 440px;
    padding: 2.25rem 2rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75), 0 0 30px rgba(0, 0, 0, 0.5);
    transform: scale(0.92) translateY(12px);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

.custom-modal-backdrop.show .custom-modal-card {
    transform: scale(1) translateY(0);
}

body.light-mode .custom-modal-backdrop {
    background: rgba(15, 23, 42, 0.45);
}

body.light-mode .custom-modal-card {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.2), 0 0 25px rgba(0, 0, 0, 0.05);
}

.custom-modal-x {
    position: absolute;
    top: 1.1rem;
    right: 1.1rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.custom-modal-x:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

body.light-mode .custom-modal-x:hover {
    background: #f1f5f9;
}

/* Icon Wrapper with glow animations */
.custom-modal-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    position: relative;
    transition: all 0.3s ease;
}

.custom-modal-icon-wrapper svg {
    width: 32px;
    height: 32px;
}

.custom-modal-icon-wrapper.warning {
    background: rgba(245, 158, 11, 0.15);
    color: #F59E0B;
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.35);
    border: 1px solid rgba(245, 158, 11, 0.25);
    animation: iconPulseWarning 2s infinite ease-in-out;
}

.custom-modal-icon-wrapper.danger {
    background: rgba(239, 68, 68, 0.15);
    color: #EF4444;
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.35);
    border: 1px solid rgba(239, 68, 68, 0.25);
    animation: iconPulseDanger 2s infinite ease-in-out;
}

.custom-modal-icon-wrapper.success {
    background: rgba(16, 185, 129, 0.15);
    color: #10B981;
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.35);
    border: 1px solid rgba(16, 185, 129, 0.25);
    animation: iconPulseSuccess 2s infinite ease-in-out;
}

.custom-modal-icon-wrapper.info {
    background: rgba(56, 189, 248, 0.15);
    color: #38BDF8;
    box-shadow: 0 0 30px rgba(56, 189, 248, 0.35);
    border: 1px solid rgba(56, 189, 248, 0.25);
    animation: iconPulseInfo 2s infinite ease-in-out;
}

@keyframes iconPulseWarning {
    0%, 100% { box-shadow: 0 0 25px rgba(245, 158, 11, 0.3); transform: scale(1); }
    50% { box-shadow: 0 0 40px rgba(245, 158, 11, 0.5); transform: scale(1.04); }
}

@keyframes iconPulseDanger {
    0%, 100% { box-shadow: 0 0 25px rgba(239, 68, 68, 0.3); transform: scale(1); }
    50% { box-shadow: 0 0 40px rgba(239, 68, 68, 0.5); transform: scale(1.04); }
}

@keyframes iconPulseSuccess {
    0%, 100% { box-shadow: 0 0 25px rgba(16, 185, 129, 0.3); transform: scale(1); }
    50% { box-shadow: 0 0 40px rgba(16, 185, 129, 0.5); transform: scale(1.04); }
}

@keyframes iconPulseInfo {
    0%, 100% { box-shadow: 0 0 25px rgba(56, 189, 248, 0.3); transform: scale(1); }
    50% { box-shadow: 0 0 40px rgba(56, 189, 248, 0.5); transform: scale(1.04); }
}

.custom-modal-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.65rem;
    line-height: 1.3;
}

.custom-modal-message {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.85rem;
    word-break: break-word;
}

.custom-modal-actions {
    display: flex;
    width: 100%;
    gap: 0.85rem;
}

.custom-modal-btn {
    flex: 1;
    padding: 0.8rem 1.25rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    outline: none;
}

.custom-modal-btn.cancel-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
}

.custom-modal-btn.cancel-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

body.light-mode .custom-modal-btn.cancel-btn {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #334155;
}

body.light-mode .custom-modal-btn.cancel-btn:hover {
    background: #e2e8f0;
}

.custom-modal-btn.confirm-btn.warning {
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35);
}

.custom-modal-btn.confirm-btn.warning:hover {
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.55);
    transform: translateY(-2px);
    filter: brightness(1.08);
}

.custom-modal-btn.confirm-btn.danger {
    background: linear-gradient(135deg, #EF4444, #DC2626);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.35);
}

.custom-modal-btn.confirm-btn.danger:hover {
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.55);
    transform: translateY(-2px);
    filter: brightness(1.08);
}

.custom-modal-btn.confirm-btn.success {
    background: linear-gradient(135deg, #10B981, #059669);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
}

.custom-modal-btn.confirm-btn.success:hover {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.55);
    transform: translateY(-2px);
    filter: brightness(1.08);
}

.custom-modal-btn.confirm-btn.info {
    background: linear-gradient(135deg, #38BDF8, #0284C7);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.35);
}

.custom-modal-btn.confirm-btn.info:hover {
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.55);
    transform: translateY(-2px);
    filter: brightness(1.08);
}

.custom-modal-btn:active {
    transform: translateY(1px) !important;
}

/* ==========================================================================
   Shironam Published Minimal Indicator
   ========================================================================== */

/* Clean Green Published Badge on Image Thumbnail */
.story-badge-published {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: #10b981;
    color: #ffffff;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    z-index: 2;
}

.story-badge-published .badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #ffffff;
}





