/* Enhanced EPUB Management Platform - Custom Styles */

:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --success-color: #059669;
    --warning-color: #d97706;
    --danger-color: #dc2626;
    --info-color: #0891b2;
    --light-color: #f8fafc;
    --dark-color: #1e293b;
    --purple-color: #7c3aed;
}

/* Custom button styles */
.btn {
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Custom card styles */
.card {
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Purple color class */
.text-purple {
    color: var(--purple-color) !important;
}

.bg-purple {
    background-color: var(--purple-color) !important;
}

.border-purple {
    border-color: var(--purple-color) !important;
}

/* Custom navbar styles */
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

/* Hero section styles */
.display-4 {
    font-weight: 800;
}

/* Dashboard stats cards */
.stats-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stats-card:hover {
    transform: scale(1.05);
}

.stats-card .stats-number {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.stats-card .stats-label {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Analytics stats grid and cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.stat-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.stat-card .stat-number {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: white;
}

.stat-card .stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
    color: white;
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Code block styling */
pre {
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1rem;
    font-size: 0.875rem;
    overflow-x: auto;
}

/* Table styles */
.table-custom {
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.table-custom thead {
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    color: white;
}

/* Form styles */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

/* Alert styles */
.alert {
    border-radius: 0.75rem;
    border: none;
    font-weight: 500;
}

/* Loading spinner */
.spinner-custom {
    width: 2rem;
    height: 2rem;
    border: 3px solid rgba(37, 99, 235, 0.3);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Progress bar */
.progress-custom {
    height: 0.75rem;
    border-radius: 0.5rem;
    background-color: #e5e7eb;
}

.progress-custom .progress-bar {
    border-radius: 0.5rem;
    background: linear-gradient(90deg, var(--primary-color), var(--info-color));
}

/* Badge styles */
.badge-custom {
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
}

/* Utility classes */
.shadow-custom {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.border-radius-lg {
    border-radius: 1rem !important;
}

.border-radius-xl {
    border-radius: 1.5rem !important;
}

/* Responsive text sizes */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2.5rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    .display-6 {
        font-size: 1.75rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .card {
        background-color: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }
    
    .table-custom {
        background-color: #374151;
        color: #f9fafb;
    }
    
    pre {
        background-color: #374151;
        color: #e5e7eb;
    }
}

/* Annotation specific styles */
.annotation-highlight {
    background: linear-gradient(120deg, #a8e6cf 0%, #dcedc8 100%);
    padding: 2px 4px;
    border-radius: 3px;
    cursor: pointer;
    position: relative;
}

.annotation-marker {
    position: absolute;
    top: -20px;
    right: -5px;
    background: var(--success-color);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
}

/* Reading progress bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(37, 99, 235, 0.3);
    z-index: 9999;
}

.reading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--success-color));
    transition: width 0.3s ease;
    width: 0%;
}
