/* Quoinlock - Dark Theme with Purple Accents */

:root {
    /* Dark backgrounds - matching quoinlock.com */
    --bg-darkest: #0f0f1e;
    --bg-mid: #1a1a2e;
    --bg-deep: #16213e;
    --bg-card: rgba(26, 26, 46, 0.8);
    --bg-card-hover: rgba(26, 26, 46, 0.95);

    /* Purple/Indigo accents */
    --primary: #8b5cf6;
    --primary-light: #a78bfa;
    --primary-dark: #7c3aed;
    --indigo: #6366f1;
    --indigo-light: #818cf8;

    /* Text colors */
    --text-primary: #e4e4e7;
    --text-secondary: #d4d4d8;
    --text-muted: #a1a1aa;
    --text-accent: #c7d2fe;

    /* Utility colors */
    --success: #22c55e;
    --success-light: #86efac;
    --danger: #ef4444;
    --danger-light: #fca5a5;
    --warning: #f59e0b;
    --warning-light: #fcd34d;

    /* Border and divider */
    --border: rgba(255, 255, 255, 0.1);
    --border-light: rgba(255, 255, 255, 0.05);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--bg-darkest) 0%, var(--bg-mid) 50%, var(--bg-deep) 100%);
    background-attachment: fixed;
    min-height: 100vh;
    position: relative;
}

/* Animated background orbs */
body::before,
body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
}

body::before {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--indigo) 0%, transparent 70%);
    top: -250px;
    right: -250px;
    animation: float 20s ease-in-out infinite;
}

body::after {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    bottom: -200px;
    left: -200px;
    animation: float 15s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 1;
}

/* Header */
header {
    background: rgba(15, 15, 30, 0.7);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Inter Tight', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--indigo-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    transition: all 0.3s ease;
}

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

.logo-icon {
    width: 40px;
    height: 40px;
    filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.5));
}

.org-name {
    font-family: 'Inter Tight', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-left: auto;
    margin-right: auto;
    white-space: nowrap;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 500;
}

nav a:hover {
    color: var(--text-primary);
    background: rgba(139, 92, 246, 0.1);
}

/* Nav Buttons */
.nav-btn {
    color: var(--text-secondary) !important;
    font-weight: 600 !important;
    padding: 0.6rem 1.25rem !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--border) !important;
    font-size: 0.9rem !important;
}

.nav-btn:hover {
    color: var(--text-primary) !important;
    background: rgba(139, 92, 246, 0.15) !important;
    border-color: rgba(139, 92, 246, 0.3) !important;
}

.nav-btn.active {
    color: white !important;
    background: linear-gradient(135deg, var(--primary) 0%, var(--indigo) 100%) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4) !important;
}

/* Nav Icon Buttons */
.nav-icon-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0 !important;
    border-radius: 8px !important;
}

.nav-icon-btn svg {
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.nav-icon-btn:hover svg {
    color: var(--primary-light);
}

/* Main content */
main {
    padding: 3rem 0;
    min-height: calc(100vh - 200px);
    position: relative;
    z-index: 1;
}

h1, h2, h3 {
    margin-bottom: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: 1.75rem;
    color: var(--text-primary);
}

h3 {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

/* Cards with glassmorphism */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(139, 92, 246, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 12px 48px rgba(139, 92, 246, 0.15);
}

.card-header {
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.card-header h2 {
    margin: 0;
}

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

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary);
}

input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.875rem 1.75rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--indigo) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary);
}

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

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    overflow: hidden;
}

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

th {
    font-weight: 600;
    background: rgba(139, 92, 246, 0.1);
    color: var(--text-accent);
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
}

tr:hover {
    background: rgba(139, 92, 246, 0.05);
}

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

/* Badges */
.badge {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

.badge-success {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success-light);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning-light);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger-light);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.3);
    border-color: rgba(139, 92, 246, 0.4);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--indigo-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* Footer */
footer {
    background: rgba(15, 15, 30, 0.7);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
    color: var(--text-muted);
    position: relative;
    z-index: 1;
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success-light);
    border-color: var(--success);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-light);
    border-color: var(--danger);
}

.alert-info {
    background: rgba(99, 102, 241, 0.1);
    color: var(--indigo-light);
    border-color: var(--indigo);
}

/* Landing page hero */
.hero {
    text-align: center;
    padding: 5rem 0;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Feature list */
.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.feature-list li:last-child {
    border-bottom: none;
}

.feature-list strong {
    color: var(--primary-light);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.feature-list strong::before {
    content: '✓';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--indigo) 100%);
    border-radius: 50%;
    font-weight: bold;
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    nav ul {
        gap: 1rem;
    }

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

    .container {
        padding: 0 1rem;
    }
}

/* Books Grid - Responsive Column Layout */
.books-grid-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

/* More columns for very wide screens */
@media (min-width: 1500px) {
    .books-grid-5 {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (min-width: 1800px) {
    .books-grid-5 {
        grid-template-columns: repeat(7, 1fr);
    }
}

.book-card-5 {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.book-cover-link {
    display: block;
    text-decoration: none;
    transition: all 0.3s ease;
}

.book-cover-link:hover {
    transform: translateY(-4px);
}

.book-cover-link:hover .book-cover-5 {
    box-shadow: 0 12px 32px rgba(139, 92, 246, 0.25);
    border-color: rgba(139, 92, 246, 0.4);
}

.book-cover-5 {
    width: 100%;
    height: 250px;
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(139, 92, 246, 0.15);
    transition: all 0.3s ease;
}

.book-cover-5 img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.no-cover-5 {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: rgba(255, 255, 255, 0.2);
}

.book-details-5 {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.book-field {
    display: flex;
    flex-direction: column;
}

.field-value {
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 400;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.field-value.isbn-formatted {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.btn-listings {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 6px;
    color: var(--primary-light);
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-listings:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: var(--primary);
    transform: translateY(-1px);
}

/* Responsive adjustments for 5-column grid */
@media (max-width: 1400px) {
    .books-grid-5 {
        grid-template-columns: repeat(4, 1fr);
    }
}

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

@media (max-width: 768px) {
    .books-grid-5 {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

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

/* Old Books Grid - Keep for backward compatibility */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.book-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(139, 92, 246, 0.1);
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.book-card:hover {
    transform: translateY(-4px);
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.15);
}

.book-cover {
    width: 100%;
    max-height: 300px;
    aspect-ratio: 2/3;
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.book-cover img {
    width: 100%;
    height: 100%;
    max-height: 300px;
    object-fit: contain;
}

.no-cover {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: rgba(255, 255, 255, 0.3);
}

.book-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.book-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
}

.book-meta {
    font-size: 0.875rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Loading animation */
@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

.loading {
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 0px, rgba(255,255,255,0.1) 40px, rgba(255,255,255,0.05) 80px);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Add Books Button */
.btn-add-books {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--indigo) 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.btn-add-books:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.4);
}

.btn-add-books svg {
    color: white;
}

/* Modal */
[x-cloak] {
    display: none !important;
}

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

.modal-content {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

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

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.modal-body {
    padding: 2rem;
}

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

/* Modal Tabs */
.modal-tabs {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.modal-tabs > div:first-child {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 0.5rem;
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.tab-btn.active {
    color: var(--primary-light);
    border-bottom-color: var(--primary);
}

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

.tab-content {
    animation: fadeIn 0.3s ease;
}

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

/* ISBN Input Groups */
.isbn-input-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.isbn-input {
    flex: 1;
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.isbn-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.btn-remove-isbn {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 6px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-remove-isbn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: var(--danger);
}

.btn-remove-isbn svg {
    color: var(--danger-light);
}

.help-text {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* Upload Area */
.upload-area {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.05);
}

.upload-area input[type="file"] {
    display: none;
}

.upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    color: var(--text-secondary);
}

.upload-label svg {
    color: var(--primary-light);
}

.upload-label span:first-of-type {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
}

.upload-hint {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Delete Icon Button */
.btn-icon-delete {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon-delete:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: var(--danger);
    transform: scale(1.1);
}

.btn-icon-delete svg {
    color: var(--danger-light);
}

/* Modal Variations */
.modal-small {
    max-width: 450px;
}

/* Table Checkboxes */
table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

/* Loading Data State */
.loading-data {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 0;
}

.btn-refresh {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-refresh:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: var(--primary);
    transform: rotate(180deg);
}

.btn-refresh svg {
    color: var(--primary-light);
}

.loading-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: center;
    font-weight: 500;
}

.loading-subtext {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
}

.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-spinner svg {
    color: var(--primary);
    animation: spin 2s linear infinite;
}

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

/* Expandable Source Rows */
.source-row {
    transition: background-color 0.2s ease;
}

.source-row:hover {
    background-color: rgba(139, 92, 246, 0.05);
}

.source-row.expanded {
    background-color: rgba(139, 92, 246, 0.1);
}

.expanded-content {
    padding: 0 !important;
    background: rgba(15, 15, 30, 0.5);
}

.source-details {
    padding: 1.5rem;
}

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

.source-details-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.btn-refresh {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-refresh::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-refresh:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.5);
}

.btn-refresh:hover::before {
    left: 100%;
}

.btn-refresh:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.btn-refresh svg {
    width: 16px;
    height: 16px;
    animation: spin 2s linear infinite;
    animation-play-state: paused;
}

.btn-refresh:hover svg {
    animation-play-state: running;
}

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

/* Refresh Icon Button */
.btn-refresh-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.btn-refresh-icon:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.5);
}

.btn-refresh-icon:active {
    transform: translateY(0) scale(1);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.btn-refresh-icon svg {
    width: 18px;
    height: 18px;
    color: white;
    animation: spin 2s linear infinite;
    animation-play-state: paused;
}

.btn-refresh-icon:hover svg {
    animation-play-state: running;
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.data-section h3,
.screenshot-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.data-fields {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.data-field {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 1rem;
    padding: 0.5rem;
    background: rgba(26, 26, 46, 0.3);
    border-radius: 4px;
}

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

.field-value {
    font-size: 0.875rem;
    color: var(--text-secondary);
    word-break: break-word;
}

.field-value a {
    color: var(--primary-light);
    text-decoration: none;
}

.field-value a:hover {
    text-decoration: underline;
}

.raw-data-section {
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(15, 15, 30, 0.5);
    border: 1px solid var(--border);
    border-radius: 4px;
}

.raw-data-section summary {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
}

.raw-data-section summary:hover {
    color: var(--primary-light);
}

.raw-data {
    margin-top: 0.75rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-secondary);
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.screenshot-section {
    display: flex;
    flex-direction: column;
}

.screenshot-container {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.screenshot-image {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.screenshot-image:hover {
    transform: scale(1.02);
}

.no-screenshot {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px dashed var(--border);
    border-radius: 8px;
}

/* Responsive adjustments for detail view */
@media (max-width: 1200px) {
    .details-grid {
        grid-template-columns: 1fr;
    }
    
    .screenshot-section {
        margin-top: 1.5rem;
    }
}

@media (max-width: 768px) {
    .data-field {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .field-label {
        font-weight: 600;
    }
}

/* Profile Page Styles */
.profile-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 968px) {
    .profile-layout {
        grid-template-columns: 1fr;
    }
}

.profile-sidebar {
    position: sticky;
    top: 2rem;
}

.profile-picture-section {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
}

.profile-picture-container {
    width: 200px;
    height: 200px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid rgba(139, 92, 246, 0.3);
    background: rgba(15, 15, 30, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-picture {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-picture-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.profile-picture-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-upload {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--indigo-light) 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-upload:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.4);
}

.upload-hint {
    margin: 0;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

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

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

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    background: rgba(26, 26, 46, 0.5);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(26, 26, 46, 0.8);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.readonly-input {
    background: rgba(26, 26, 46, 0.3) !important;
    color: var(--text-muted) !important;
    cursor: not-allowed;
}

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

.timezone-select {
    cursor: pointer;
}

.form-actions {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.notification-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.notification-item {
    padding: 1rem;
    background: rgba(26, 26, 46, 0.3);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.notification-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.notification-header svg {
    color: var(--primary-light);
}

.notification-value {
    padding-left: 2rem;
}

/* Enhanced Save Button for Profile */
.btn-save {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 50%, #7c3aed 100%);
    background-size: 200% 100%;
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4), 
                0 0 0 0 rgba(139, 92, 246, 0.5);
    position: relative;
    overflow: hidden;
}

.btn-save::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-save:hover {
    background-position: 100% 0;
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.6),
                0 0 0 4px rgba(139, 92, 246, 0.1);
}

.btn-save:hover::before {
    left: 100%;
}

.btn-save:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
}

.btn-save svg {
    width: 18px;
    height: 18px;
}

/* Navigation Profile Picture */
.nav-profile-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.1);
    border: 2px solid rgba(139, 92, 246, 0.3);
    transition: all 0.3s ease;
}

.nav-profile-btn:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.5);
    transform: scale(1.1);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.nav-profile-picture {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* Saved State for Save Button */
.btn-saved {
    background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%) !important;
    background-size: 200% 100% !important;
    animation: pulse-saved 0.5s ease-in-out;
}

@keyframes pulse-saved {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 8px 30px rgba(16, 185, 129, 0.6);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
    }
}

.btn-saved:hover {
    background-position: 100% 0 !important;
    transform: translateY(0) !important;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.5) !important;
}

/* Book Overview Section */
.book-overview {
    margin-bottom: 2rem;
}

.book-overview-container {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.book-overview-cover {
    flex-shrink: 0;
    width: 200px;
}

.book-overview-cover img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.no-cover-overview {
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.no-cover-overview svg {
    color: #9ca3af;
}

/* Animated book loading icon */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes pageFlip {
    0%, 100% {
        transform: rotateY(0deg);
    }
    50% {
        transform: rotateY(180deg);
    }
}

@keyframes bookPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.loading-book-icon {
    position: relative;
    width: 80px;
    height: 100px;
}

.loading-book-icon .book-cover {
    animation: bookPulse 2s ease-in-out infinite;
}

.loading-book-icon .book-page {
    animation: pageFlip 1.5s ease-in-out infinite;
    transform-origin: left center;
}

.loading-book-icon .book-page:nth-child(2) {
    animation-delay: 0.15s;
}

.loading-book-icon .book-page:nth-child(3) {
    animation-delay: 0.3s;
}

/* Fade-in animation for when metadata loads */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.metadata-loaded {
    animation: fadeIn 0.5s ease-out;
}

.book-overview-details {
    flex: 1;
    min-width: 0;
}

.book-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
}

.book-subtitle {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin: 0 0 1.5rem 0;
    line-height: 1.3;
}

.book-metadata {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem 1.5rem;
}

.metadata-row {
    display: flex;
    gap: 0.5rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.metadata-label {
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 120px;
    flex-shrink: 0;
}

.metadata-value {
    color: var(--text-primary);
    flex: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .book-overview-container {
        flex-direction: column;
    }

    .book-overview-cover {
        width: 100%;
        max-width: 200px;
        margin: 0 auto;
    }

    .book-metadata {
        grid-template-columns: 1fr;
    }
}
