/* Base Styles */
body {
    font-family: 'Inter', sans-serif;
}

.font-serif {
    font-family: 'Merriweather', serif;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #f7931a 0%, #ffb347 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Reading Progress Bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #f7931a, #ffb347);
    z-index: 100;
    transition: width 0.1s ease;
}

/* Chapter Cards */
.chapter-card {
    transition: all 0.3s ease;
}

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

/* Key Point Styling */
.key-point {
    border-left: 4px solid #f7931a;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #f7931a;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #e68a17;
}

/* Smooth Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* Selection Color */
::selection {
    background: #f7931a;
    color: white;
}

/* Table Styles */
table {
    border-collapse: collapse;
}

/* Animation for Book Cover */
@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(3deg);
    }
    50% {
        transform: translateY(-10px) rotate(3deg);
    }
}

.book-cover-animation {
    animation: float 4s ease-in-out infinite;
}

/* Button Hover Effects */
.share-btn {
    transition: all 0.3s ease;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Card Hover Shadows */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* Line Clamp for Card Descriptions */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

/* Link Hover Effect */
a {
    transition: color 0.3s ease;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.toast.show {
    opacity: 1;
}

/* Dark Mode Styles (for future use) */
.dark-mode {
    background-color: #1a1a1a;
    color: #f0f0f0;
}

.dark-mode .bg-white {
    background-color: #2d2d2d;
}

.dark-mode .text-gray-700 {
    color: #d0d0d0;
}

.dark-mode .text-gray-600 {
    color: #b0b0b0;
}

.dark-mode .border-gray-100 {
    border-color: #404040;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .chapter-card:hover {
        transform: none;
    }
    
    .book-cover-animation {
        animation: none;
    }
}

/* Reduced Motion Preference (Accessibility & Performance) */
@media (prefers-reduced-motion: reduce) {
    .book-cover-animation,
    .fade-in,
    .share-btn:hover,
    .chapter-card:hover {
        animation: none;
        transition: none;
        transform: none;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Print Styles */
@media print {
    .reading-progress,
    nav,
    .share-btn,
    footer {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
    }
    
    .key-point {
        break-inside: avoid;
    }
}
