/* ==================== CSS VARIABLES ==================== */
:root {
    /* Color Palette */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --dark-gradient: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    
    --primary-color: #667eea;
    --primary-hover: #5a6fd8;
    --secondary-color: #764ba2;
    --accent-color: #4facfe;
    --accent-hover: #3d8bfe;
    
    --success-color: #10dc60;
    --warning-color: #ffce00;
    --danger-color: #f04141;
    --info-color: #3880ff;
    
    /* Background Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #e2e8f0;
    --bg-dark: #1a202c;
    --bg-card: #ffffff;
    
    /* Text Colors */
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --text-muted: #a0aec0;
    --text-light: #ffffff;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    
    /* Transitions */
    --transition-fast: all 0.15s ease;
    --transition-normal: all 0.2s ease;
    --transition-slow: all 0.3s ease;
    
    /* Z-Index */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
}

/* ==================== BASE STYLES ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-secondary);
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* ==================== ACCESSIBILITY ==================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.sr-only-focusable:focus {
    position: static;
    width: auto;
    height: auto;
    padding: 0.5rem 1rem;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    z-index: var(--z-tooltip);
}

/* ==================== NAVIGATION ==================== */
.navbar {
    background: var(--primary-gradient);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-lg);
    transition: var(--transition-slow);
    padding: 1rem 0;
}

.navbar.scrolled {
    padding: 0.5rem 0;
    box-shadow: var(--shadow-xl);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.75rem;
    color: white !important;
    transition: var(--transition-normal);
    text-decoration: none;
}

.navbar-brand:hover {
    transform: scale(1.05);
    color: white !important;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius-md);
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.nav-link:hover,
.nav-link.active {
    color: white !important;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.nav-link::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: var(--transition-slow);
}

.nav-link:hover::before {
    left: 100%;
}

/* Search Container */
.search-container {
    position: relative;
    width: 300px;
}

.search-input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: var(--radius-lg);
    padding: 0.5rem 1rem;
    transition: var(--transition-normal);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-input:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
    outline: none;
}

.btn-search {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    transition: var(--transition-normal);
}

.btn-search:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: scale(1.05);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    max-height: 400px;
    overflow-y: auto;
    z-index: var(--z-dropdown);
    display: none;
    margin-top: 0.5rem;
}

.search-results .list-group-item {
    border: none;
    padding: 1rem;
    transition: var(--transition-fast);
    cursor: pointer;
}

.search-results .list-group-item:hover {
    background: var(--bg-secondary);
    transform: translateX(5px);
}

/* User Menu */
.user-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.1);
    transition: var(--transition-normal);
}

.user-menu:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-xl);
    border-radius: var(--radius-lg);
    padding: 0.5rem;
    margin-top: 0.5rem;
}

.dropdown-item {
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dropdown-item:hover {
    background: var(--bg-secondary);
    transform: translateX(5px);
}

/* ==================== FAB (Floating Action Button) ==================== */
.fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: var(--shadow-xl);
    cursor: pointer;
    transition: var(--transition-normal);
    z-index: var(--z-fixed);
    border: none;
}

.fab:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: var(--shadow-2xl);
}

.fab:active {
    transform: scale(0.95);
}

/* ==================== NOTIFICATION SYSTEM ==================== */
.notification-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: var(--z-tooltip);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.notification {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-xl);
    border-left: 4px solid var(--success-color);
    min-width: 300px;
    transform: translateX(100%);
    opacity: 0;
    transition: var(--transition-slow);
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification.success { border-left-color: var(--success-color); }
.notification.warning { border-left-color: var(--warning-color); }
.notification.error { border-left-color: var(--danger-color); }
.notification.info { border-left-color: var(--info-color); }

/* ==================== HERO SECTION ==================== */
.hero-section {
    background: var(--primary-gradient);
    color: white;
    padding: 8rem 0 4rem;
    margin-top: 76px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="rgba(255,255,255,0.03)"><polygon points="0,0 1000,80 1000,100 0,100"/></svg>');
    background-size: cover;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(45deg, #fff, #e2e8f0);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeInUp 1s ease;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    animation: fadeInUp 1s ease 0.4s both;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: white;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.8;
}

.hero-image {
    position: relative;
    animation: fadeInRight 1s ease 0.6s both;
}

.hero-image img {
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-2xl);
    transition: var(--transition-slow);
}

.hero-image:hover img {
    transform: scale(1.05) rotateY(5deg);
}

/* ==================== QUICK ACTIONS ==================== */
.quick-actions-section {
    padding: 4rem 0;
    background: var(--bg-primary);
}

.quick-action-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.quick-action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--accent-gradient);
    opacity: 0;
    transition: var(--transition-slow);
    z-index: 1;
}

.quick-action-card:hover::before {
    left: 0;
    opacity: 0.1;
}

.quick-action-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.quick-action-icon {
    position: relative;
    z-index: 2;
    width: 80px;
    height: 80px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: white;
    transition: var(--transition-normal);
}

.quick-action-card:hover .quick-action-icon {
    transform: scale(1.1) rotateY(180deg);
}

.quick-action-card h3 {
    position: relative;
    z-index: 2;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.quick-action-card p {
    position: relative;
    z-index: 2;
    color: var(--text-secondary);
    margin: 0;
}

/* ==================== SECTION STYLES ==================== */
.progress-section,
.trending-section,
.recommendations-section,
.upcoming-section {
    padding: 4rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    position: relative;
    color: var(--text-primary);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: var(--radius-sm);
}

.section-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

/* ==================== PROGRESS SECTION ==================== */
.progress-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 1rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
}

.filter-btn {
    background: transparent;
    border: 2px solid var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-lg);
    font-weight: 500;
    transition: var(--transition-fast);
    cursor: pointer;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary-gradient);
    border-color: transparent;
    color: white;
    transform: translateY(-2px);
}

.view-toggle {
    display: flex;
    gap: 0.25rem;
    background: var(--bg-secondary);
    padding: 0.25rem;
    border-radius: var(--radius-lg);
}

.view-btn {
    background: transparent;
    border: none;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    transition: var(--transition-fast);
    cursor: pointer;
}

.view-btn.active,
.view-btn:hover {
    background: white;
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.progress-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.progress-item {
    background: white;
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.progress-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-gradient);
}

.progress-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.progress-item img {
    width: 80px;
    height: 120px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    margin-right: 1rem;
    transition: var(--transition-normal);
}

.progress-item:hover img {
    transform: scale(1.05);
}

/* ==================== MODERN BUTTONS ==================== */
.btn-modern {
    background: var(--primary-gradient);
    border: none;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.btn-modern::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: var(--transition-slow);
}

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

.btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}

/* ==================== MODAL STYLES ==================== */
.add-new-progress-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

.modal-content-custom {
    position: relative;
    background: white;
    border-radius: var(--radius-2xl);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-2xl);
    animation: slideInUp 0.3s ease;
}

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

.modal-header-custom h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.btn-close-custom {
    background: var(--bg-secondary);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition-fast);
    cursor: pointer;
}

.btn-close-custom:hover {
    background: var(--danger-color);
    color: white;
    transform: scale(1.1);
}

.modal-body-custom {
    padding: 2rem;
}

.modal-footer-custom {
    padding: 1rem 2rem 2rem;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.search-section {
    margin-bottom: 2rem;
}

.search-input-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.search-results-modal {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    max-height: 200px;
    overflow-y: auto;
    display: none;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-weight: 500;
    color: var(--text-primary);
}

.form-control,
.form-select {
    padding: 0.75rem 1rem;
    border: 2px solid var(--bg-tertiary);
    border-radius: var(--radius-lg);
    transition: var(--transition-fast);
    font-family: inherit;
}

.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* ==================== TRENDING SECTION ==================== */
.trending-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    background: white;
    padding: 0.5rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    width: fit-content;
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition-fast);
    cursor: pointer;
}

.tab-btn.active,
.tab-btn:hover {
    background: var(--primary-gradient);
    color: white;
    transform: translateY(-2px);
}

.trending-grid,
.recommendations-grid,
.continue-watching-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

/* ==================== ANIME CARDS ==================== */
.anime-card {
    background: white;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
    cursor: pointer;
    position: relative;
}

.anime-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--primary-gradient);
    opacity: 0;
    transition: var(--transition-normal);
    z-index: 1;
}

.anime-card:hover::before {
    opacity: 0.1;
}

.anime-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

.anime-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: var(--transition-slow);
}

.anime-card:hover img {
    transform: scale(1.1);
}

.anime-card .card-body {
    position: relative;
    z-index: 2;
    padding: 1.5rem;
}

.anime-card .card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.anime-card .card-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.rating-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.rating-stars {
    color: #fbbf24;
}

.rating-score {
    font-weight: 600;
    color: var(--text-primary);
}

.progress-display {
    margin-bottom: 1rem;
}

.progress {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.progress-bar {
    background: var(--primary-gradient);
    transition: width 0.6s ease;
}

.card-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}

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

/* ==================== SIDEBAR ==================== */
.sidebar-content {
    position: sticky;
    top: 100px;
}

.upcoming-list {
    background: white;
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

.upcoming-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--bg-tertiary);
    transition: var(--transition-fast);
}

.upcoming-item:last-child {
    border-bottom: none;
}

.upcoming-item:hover {
    transform: translateX(5px);
}

.upcoming-title {
    font-weight: 500;
    color: var(--text-primary);
}

.upcoming-time {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.stats-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
}

.stats-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.stat-item-sidebar {
    text-align: center;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    transition: var(--transition-fast);
}

.stat-item-sidebar:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-5px);
}

.stat-item-sidebar .stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
}

.stat-item-sidebar .stat-label {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* ==================== LOADING ANIMATIONS ==================== */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.loading-spinner-modern {
    position: relative;
    width: 60px;
    height: 60px;
    margin-bottom: 1rem;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-ring:nth-child(2) {
    animation-delay: -0.3s;
    border-top-color: var(--accent-color);
}

.spinner-ring:nth-child(3) {
    animation-delay: -0.6s;
    border-top-color: var(--secondary-color);
}

/* ==================== FOOTER ==================== */
.footer {
    background: var(--dark-gradient);
    color: white;
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--accent-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-description {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.footer-subtitle {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: white;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: white;
    transform: translateX(5px);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: var(--transition-normal);
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-5px);
}

.footer-divider {
    border-color: rgba(255, 255, 255, 0.2);
    margin: 2rem 0 1rem;
}

.footer-bottom {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

.footer-bottom a {
    color: var(--accent-color);
    text-decoration: none;
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% { transform: translateY(0); }
    40%, 43% { transform: translateY(-30px); }
    70% { transform: translateY(-15px); }
    90% { transform: translateY(-4px); }
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 1200px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .search-container {
        width: 250px;
    }
}

@media (max-width: 992px) {
    .hero-section {
        padding: 6rem 0 3rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-stats {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .progress-grid,
    .trending-grid,
    .recommendations-grid,
    .continue-watching-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 0.5rem 0;
    }
    
    .hero-section {
        padding: 4rem 0 2rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-stats {
        gap: 1rem;
    }
    
    .search-container {
        width: 100%;
        margin-top: 1rem;
    }
    
    .section-header-container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .progress-filters {
        flex-direction: column;
        gap: 1rem;
    }
    
    .filter-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .quick-actions-section .row {
        gap: 1rem;
    }
    
    .quick-action-card {
        margin-bottom: 1rem;
    }
    
    .trending-tabs {
        width: 100%;
        justify-content: center;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content-custom {
        margin: 1rem;
        width: calc(100% - 2rem);
    }
    
    .modal-header-custom,
    .modal-body-custom,
    .modal-footer-custom {
        padding: 1rem;
    }
    
    .fab {
        bottom: 1rem;
        right: 1rem;
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
}

@media (max-width: 576px) {
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .progress-grid,
    .trending-grid,
    .recommendations-grid,
    .continue-watching-grid {
        grid-template-columns: 1fr;
    }
    
    .navbar-brand {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .filter-buttons {
        gap: 0.25rem;
    }
    
    .filter-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
}

/* ==================== DARK MODE SUPPORT ==================== */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #1a202c;
        --bg-secondary: #2d3748;
        --bg-tertiary: #4a5568;
        --bg-card: #2d3748;
        --text-primary: #f7fafc;
        --text-secondary: #e2e8f0;
        --text-muted: #a0aec0;
    }
    
    body {
        background: var(--bg-primary);
        color: var(--text-primary);
    }
    
    .anime-card,
    .progress-item,
    .upcoming-list,
    .stats-card,
    .modal-content-custom {
        background: var(--bg-card);
        color: var(--text-primary);
    }
    
    .form-control,
    .form-select {
        background: var(--bg-tertiary);
        color: var(--text-primary);
        border-color: var(--bg-tertiary);
    }
    
    .search-results {
        background: var(--bg-card);
    }
    
    .dropdown-menu {
        background: var(--bg-card);
    }
}

/* ==================== CUSTOM SCROLLBAR ==================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-gradient);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* ==================== PRINT STYLES ==================== */
@media print {
    .navbar,
    .fab,
    .notification-container,
    .footer {
        display: none;
    }
    
    .hero-section {
        margin-top: 0;
        padding: 2rem 0;
    }
    
    * {
        box-shadow: none !important;
    }
}

/* ==================== HIGH CONTRAST MODE ==================== */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0000ff;
        --accent-color: #ff0000;
        --text-primary: #000000;
        --text-secondary: #333333;
        --bg-primary: #ffffff;
        --bg-secondary: #f0f0f0;
    }
    
    .btn-modern {
        background: var(--primary-color);
        border: 2px solid var(--primary-color);
    }
    
    .anime-card:hover {
        outline: 3px solid var(--primary-color);
    }
}

/* ==================== REDUCED MOTION ==================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero-image:hover img {
        transform: none;
    }
    
    .anime-card:hover {
        transform: none;
    }
    
    .quick-action-card:hover {
        transform: none;
    }
}