/* Custom Styles for KimCartoon Scraper */

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --dark-color: #343a40;
}

body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Navbar Styles */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

/* Alphabet Filter */
.alphabet-filter {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.filter-btn {
    display: inline-block;
    padding: 8px 15px;
    margin: 5px;
    text-decoration: none;
    color: #333;
    border: 2px solid #ddd;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-btn:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    text-decoration: none;
}

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

/* Cartoon Card Styles */
.cartoon-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.cartoon-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.cartoon-card .card-img-top {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cartoon-card:hover .card-img-top {
    transform: scale(1.05);
}

.cartoon-card .position-relative {
    overflow: hidden;
}

/* Badge Styles */
.badge-hot {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    animation: pulse 2s infinite;
}

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

/* Latest Episode Badge */
.latest-episode {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    color: white;
    padding: 8px 15px;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
}

/* Card Body Styles */
.cartoon-card .card-title {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.cartoon-card .card-title a {
    color: #333;
    text-decoration: none;
}

.cartoon-card .card-title a:hover {
    color: var(--primary-color);
}

.cartoon-card .card-text {
    font-size: 0.9rem;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    min-height: 60px;
}

/* Pagination Styles */
.pagination {
    margin-top: 30px;
}

.page-link {
    color: var(--primary-color);
    border: 1px solid #dee2e6;
    padding: 10px 15px;
    transition: all 0.3s ease;
}

.page-link:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Cartoon Details Page */
.info-item {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
}

.info-label {
    font-weight: bold;
    min-width: 150px;
    color: #666;
}

.summary-text {
    line-height: 1.8;
    color: #555;
    font-size: 1.05rem;
}

/* Episode List Styles */
.episode-list {
    max-height: 600px;
    overflow-y: auto;
}

.episode-list::-webkit-scrollbar {
    width: 8px;
}

.episode-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.episode-list::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.episode-list::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}

.episode-link {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.episode-link i {
    color: var(--primary-color);
    margin-right: 5px;
}

/* Table Styles */
.table {
    margin-bottom: 0;
}

.table thead {
    background-color: #f8f9fa;
}

.table-hover tbody tr:hover {
    background-color: #f8f9fa;
    cursor: pointer;
}

/* Breadcrumb Styles */
.breadcrumb {
    background-color: white;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

/* Card Styles */
.card {
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 10px;
    overflow: hidden;
}

.card-header {
    border-bottom: 2px solid var(--primary-color);
}

/* Footer Styles */
footer {
    margin-top: 50px;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .cartoon-card .card-img-top {
        height: 300px;
    }
    
    .filter-btn {
        padding: 6px 10px;
        font-size: 0.9rem;
    }
    
    .info-label {
        min-width: 100px;
        font-size: 0.9rem;
    }
    
    .episode-list {
        max-height: 400px;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0,123,255,.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

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

/* Empty State */
.empty-state {
    text-align: center;
    padding: 50px 20px;
}

.empty-state i {
    font-size: 4rem;
    color: #ccc;
    margin-bottom: 20px;
}

/* Badge Styles */
.badge {
    padding: 6px 12px;
    border-radius: 5px;
    font-size: 0.85rem;
}

/* Card Status */
.card-status {
    margin-top: 10px;
}

/* URL Input Form Styles */
.card-title i {
    color: var(--primary-color);
}

.input-group-lg .form-control {
    font-size: 1rem;
    padding: 0.75rem 1rem;
}

.input-group-text {
    background-color: #f8f9fa;
    border-right: none;
}

.input-group .form-control:focus {
    border-left: 2px solid var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.1);
}

.btn-primary i {
    margin-right: 5px;
}

/* Utility Classes */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-light {
    background-color: #f8f9fa !important;
}

.shadow-sm {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
}

.mb-5 {
    margin-bottom: 3rem !important;
}

.mt-5 {
    margin-top: 3rem !important;
}

