/* Reset & Base Styles */
:root {
    --primary-color: #FF4081;
    --secondary-color: #536DFE;
    --accent-color: #00BCD4;
    --dark-color: #0D0D1A;
    --light-color: #FFFFFF;
    --card-bg: rgba(255, 255, 255, 0.08);
    --card-border: rgba(255, 255, 255, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.3);
    
    /* Mobile Variables */
    --mobile-padding: 12px;
    --card-radius: 16px;
    --bottom-nav-height: 60px;
}

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

html {
    scroll-behavior: smooth;
}

body.mobile-app {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--dark-color);
    color: var(--light-color);
    min-height: 100vh;
    padding-top: 60px;
    padding-bottom: 70px;
    overflow-x: hidden;
    line-height: 1.5;
}

/* Loading Overlay Mobile */
#loading-overlay.mobile-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.key-loader {
    text-align: center;
}

.key-icon {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

.loading-text {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 5px;
}

.loading-subtext {
    font-size: 0.9rem;
    color: var(--accent-color);
    opacity: 0.8;
}

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

/* Mobile Navigation */
.mobile-nav {
    background: rgba(13, 13, 26, 0.95);
    backdrop-filter: blur(20px);
    height: 60px;
    padding: 0 var(--mobile-padding);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 1000;
}

.nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 60px;
}

.nav-toggler, .nav-btn {
    background: transparent;
    border: none;
    color: var(--light-color);
    font-size: 1.2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.nav-toggler:hover, .nav-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-toggler:active, .nav-btn:active {
    transform: scale(0.95);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

.nav-actions {
    display: flex;
    gap: 8px;
}

.mobile-search {
    padding: 10px 0;
    display: none;
    animation: slideDown 0.3s ease;
}

.mobile-search.active {
    display: block;
}

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

.search-form .input-group {
    border-radius: 25px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.search-form input {
    background: transparent;
    border: none;
    color: var(--light-color);
    padding: 12px 20px;
    width: 100%;
    font-size: 0.95rem;
}

.search-form input:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--primary-color);
}

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

.search-form button {
    background: var(--primary-color);
    border: none;
    border-radius: 0 25px 25px 0;
    padding: 0 20px;
    color: white;
    transition: background 0.3s ease;
}

.search-form button:hover {
    background: #E91E63;
}

/* Sidebar Menu */
.sidebar-menu {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100vh;
    background: rgba(13, 13, 26, 0.98);
    backdrop-filter: blur(30px);
    z-index: 10000;
    transition: left 0.3s ease;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
}

.sidebar-menu.active {
    left: 0;
    box-shadow: 5px 0 30px rgba(0, 0, 0, 0.4);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.sidebar-header h5 {
    margin: 0;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.close-sidebar {
    background: transparent;
    border: none;
    color: var(--light-color);
    font-size: 1.2rem;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.close-sidebar:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.user-info {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.user-name {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 3px;
}

.user-status {
    font-size: 0.85rem;
    color: var(--accent-color);
    opacity: 0.8;
}

.sidebar-nav {
    list-style: none;
    padding: 15px 0;
    flex: 1;
}

.sidebar-nav li {
    margin: 2px 0;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    color: var(--light-color);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    font-size: 0.95rem;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(255, 255, 255, 0.05);
    border-left-color: var(--primary-color);
    color: var(--primary-color);
    padding-left: 25px;
}

.sidebar-nav i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    flex-shrink: 0;
}

.developer-info {
    color: var(--accent-color);
    font-size: 0.9rem;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.version {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Sidebar Backdrop */
.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-backdrop.active {
    display: block;
    opacity: 1;
}

/* Main Content */
main.container-fluid {
    padding: var(--mobile-padding);
    animation: slideUp 0.4s ease;
    min-height: calc(100vh - 130px);
}

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

/* Mobile Anime Grid */
.mobile-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 4%;
    justify-content: flex-start;
}

.mobile-grid .anime-card {
    width: 48%;
    margin-bottom: 16px;
    background: var(--card-bg);
    border-radius: var(--card-radius);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--card-border);
    position: relative;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.anime-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow-color);
    border-color: var(--primary-color);
}

.card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 2/3;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.episode-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(5px);
    z-index: 2;
}

.rating-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: #FFD700;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 5px;
    backdrop-filter: blur(5px);
    z-index: 2;
}

.card-content {
    padding: 12px;
}

.card-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.6em;
}

.card-subtitle {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-actions {
    display: flex;
    gap: 8px;
}

.card-btn {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    border: none;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 44px;
}

.card-btn.watch {
    background: var(--primary-color);
    color: white;
}

.card-btn.detail {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.card-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.card-btn:active {
    transform: scale(0.98);
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--bottom-nav-height);
    background: rgba(13, 13, 26, 0.95);
    backdrop-filter: blur(20px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 1000;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 10px;
    flex: 1;
    font-size: 0.7rem;
}

.bottom-nav-item i {
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.bottom-nav-item span {
    font-weight: 600;
}

.bottom-nav-item.active {
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* Hero Section Mobile */
.hero-section {
    position: relative;
    min-height: 30vh;
    max-height: 400px;
    border-radius: var(--card-radius);
    overflow: hidden;
    margin-bottom: 20px;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease;
}

.hero-slide.active {
    opacity: 1;
}

.hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    color: white;
}

.hero-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.hero-subtitle {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 10px;
}

/* Category Chips */
.category-chips {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding: 10px 0;
    margin-bottom: 20px;
    scrollbar-width: none;
    padding-bottom: 5px;
}

.category-chips::-webkit-scrollbar {
    display: none;
}

.chip {
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 25px;
    white-space: nowrap;
    color: var(--light-color);
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    flex-shrink: 0;
}

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

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0 15px 0;
}

.section-header h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    margin: 0;
}

.see-all {
    font-size: 0.85rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.see-all:hover {
    text-decoration: underline;
}

/* Page Headers */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.page-header h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

/* Detail Page */
.mobile-detail-page {
    padding-bottom: 20px;
}

.detail-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.back-btn {
    background: transparent;
    border: none;
    color: var(--light-color);
    font-size: 1.2rem;
    cursor: pointer;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.anime-detail-mobile {
    background: var(--card-bg);
    border-radius: var(--card-radius);
    overflow: hidden;
}

.detail-poster {
    position: relative;
    width: 100%;
    min-height: 40vh;
    max-height: 500px;
    overflow: hidden;
}

.poster-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.poster-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    display: flex;
    justify-content: center;
}

.btn-play {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    min-height: 50px;
}

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

.btn-play:active {
    transform: scale(0.98);
}

.detail-info {
    padding: 20px;
}

.detail-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.3;
}

.detail-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #FFD700;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.detail-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.detail-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.genre-tag {
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 15px;
    border-radius: 15px;
    font-size: 0.85rem;
    transition: background 0.3s ease;
}

.genre-tag:hover {
    background: rgba(255, 255, 255, 0.2);
}

.detail-synopsis {
    margin-top: 20px;
}

.detail-synopsis h6 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.detail-synopsis p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
}

.detail-episodes {
    margin-top: 20px;
    padding: 0 20px 20px;
}

.episodes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.episodes-header h5 {
    margin: 0;
    font-size: 1.1rem;
}

.episodes-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.episode-card {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 15px;
    text-decoration: none;
    color: var(--light-color);
    transition: all 0.3s ease;
    min-height: 70px;
}

.episode-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.episode-number {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    margin-right: 15px;
    flex-shrink: 0;
}

.episode-info {
    flex: 1;
}

.episode-title {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 5px;
}

.episode-date {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.episode-play {
    color: var(--primary-color);
    font-size: 1.2rem;
    padding: 10px;
}

/* Watch Page */
.mobile-watch-page {
    padding-bottom: 20px;
}

.watch-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.watch-header h5 {
    margin: 0;
    flex: 1;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.4;
}

.video-container {
    width: 100%;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.loading-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

.loading-video i {
    font-size: 2rem;
    margin-bottom: 10px;
}

.no-video {
    padding: 40px 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

.no-video i {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 15px;
}

/* Quality Selector */
.quality-selector {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.quality-selector h6 {
    font-size: 1rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.quality-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quality-btn {
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: var(--light-color);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    min-height: 44px;
}

.quality-btn.active,
.quality-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.quality-btn:active {
    transform: scale(0.98);
}

/* Download Section */
.download-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
}

.download-section h6 {
    font-size: 1rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.quality-title {
    font-size: 0.95rem;
    margin: 15px 0 10px 0;
    color: var(--accent-color);
}

.download-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.download-btn {
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--light-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    min-height: 44px;
}

.download-btn:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

/* Search Page */
.mobile-search-page {
    padding: 10px;
}

.search-header {
    margin-bottom: 20px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 25px;
    padding: 12px 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.search-box i {
    color: rgba(255, 255, 255, 0.5);
    margin-right: 10px;
}

.search-box input {
    background: transparent;
    border: none;
    color: var(--light-color);
    width: 100%;
    font-size: 1rem;
}

.search-box input:focus {
    outline: none;
}

.clear-search {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    font-size: 1rem;
    padding: 5px;
    border-radius: 50%;
}

.clear-search:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Search Results */
.search-results {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.result-item {
    display: flex;
    gap: 15px;
    background: var(--card-bg);
    border-radius: var(--card-radius);
    padding: 15px;
    text-decoration: none;
    color: var(--light-color);
    transition: all 0.3s ease;
}

.result-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.result-image {
    width: 80px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.result-content {
    flex: 1;
}

.result-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.3;
}

.result-meta {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
    display: flex;
    gap: 15px;
}

.result-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #FFD700;
    font-size: 0.9rem;
}

.result-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.result-actions .btn {
    padding: 8px 15px;
    font-size: 0.85rem;
    min-height: 36px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: rgba(255, 255, 255, 0.5);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h5 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.empty-state p {
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
}

.toast {
    background: rgba(13, 13, 26, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 10px;
    animation: slideIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 250px;
    max-width: 300px;
}

.toast.success {
    border-left: 4px solid #00E676;
}

.toast.error {
    border-left: 4px solid #FF4081;
}

.toast.info {
    border-left: 4px solid #536DFE;
}

.toast-icon {
    font-size: 1.2rem;
}

.toast-content {
    flex: 1;
}

.toast-message {
    font-size: 0.9rem;
    line-height: 1.4;
}

.toast-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    font-size: 1rem;
    padding: 5px;
    border-radius: 50%;
}

.toast-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.05) 25%, 
        rgba(255, 255, 255, 0.1) 50%, 
        rgba(255, 255, 255, 0.05) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: var(--card-radius);
}

.skeleton-image {
    width: 100%;
    height: 200px;
    border-radius: 10px;
}

.skeleton-line {
    height: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    margin-bottom: 10px;
}

.skeleton-line.short {
    width: 60%;
}

.skeleton-buttons {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.skeleton-button {
    flex: 1;
    height: 35px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Load More Button */
.load-more {
    text-align: center;
    margin: 30px 0;
}

.load-more .btn {
    padding: 12px 40px;
    border-radius: 25px;
    font-weight: 600;
    min-height: 44px;
}

/* Error Page */
.error-page {
    text-align: center;
    padding: 50px 20px;
}

.error-page i {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.error-page h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.error-page p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 30px;
    line-height: 1.5;
}

/* Modal Video Player */
.modal-content {
    background: var(--dark-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-title {
    color: var(--light-color);
}

.btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.7;
}

.btn-close:hover {
    opacity: 1;
}

/* Focus styles for accessibility */
:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

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

/* Selection styling */
::selection {
    background-color: var(--primary-color);
    color: white;
}

/* Hero Carousel Dots */
.hero-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    font-size: 0;
    color: transparent;
}

.hero-dot.active {
    background: var(--primary-color);
    transform: scale(1.2);
}

.hero-dot:hover {
    background: var(--secondary-color);
}

/* Pagination Styles */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 10px 15px;
    background: var(--card-bg);
    border-radius: 8px;
    color: var(--light-color);
    text-decoration: none;
    border: 1px solid var(--card-border);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    min-width: 40px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.pagination-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.pagination-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    font-weight: bold;
}

.pagination-btn.prev,
.pagination-btn.next {
    padding: 10px 20px;
}

/* Search improvements */
.clear-search {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 3px;
    border-radius: 50%;
    display: none;
}

.clear-search:hover {
    background: rgba(255, 255, 255, 0.1);
}

.search-box {
    position: relative;
}

.clear-search {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    display: none;
}

.clear-search:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Animation for carousel */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hero-slide {
    animation: fadeIn 1s ease;
}

/* Better error states */
.error-page {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px 20px;
}

.error-page i {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.error-page h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.error-page p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 30px;
    line-height: 1.5;
    max-width: 400px;
}

/* Toast improvements */
.toast-actions {
    display: flex;
    gap: 10px;
    margin-left: 10px;
}

.toast-btn {
    padding: 5px 15px;
    background: var(--primary-color);
    border: none;
    border-radius: 5px;
    color: white;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.toast-btn:hover {
    background: #E91E63;
}

/* Page info */
.page-info {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Loading improvements */
.loading-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

.loading-video i {
    font-size: 2rem;
    margin-bottom: 10px;
}

.no-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    padding: 20px;
}

.no-video i {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 15px;
}

/* Responsive pagination */
@media (max-width: 576px) {
    .pagination-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
        min-width: 35px;
    }
    
    .pagination-btn.prev,
    .pagination-btn.next {
        padding: 8px 15px;
    }
    
    .page-info {
        font-size: 0.8rem;
    }
}

/* Dark mode adjustments */
body.light-mode .pagination-btn {
    background: rgba(0, 0, 0, 0.05);
    color: var(--light-color);
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .pagination-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}

body.light-mode .pagination-btn.active {
    background: var(--primary-color);
    color: white;
}

body.light-mode .hero-dot {
    background: rgba(0, 0, 0, 0.3);
}

body.light-mode .hero-dot.active {
    background: var(--primary-color);
}

/* Profile Page Improvements */
.profile-card {
    animation: fadeIn 0.5s ease;
}

.user-avatar-large {
    animation: pulse 2s infinite;
}

.stat-item {
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.stat-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

.setting-item:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: var(--primary-color) !important;
}

.setting-item:active {
    transform: scale(0.98);
}

/* Responsive adjustments for profile */
@media (max-width: 576px) {
    .user-avatar-large {
        width: 60px !important;
        height: 60px !important;
        font-size: 1.5rem !important;
    }
    
    .stat-item {
        padding: 12px !important;
    }
    
    .stat-item div:first-child {
        font-size: 1.5rem !important;
    }
}

/* PWA Styles */
.pwa-install-prompt {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(13, 13, 26, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 15px;
  z-index: 10001;
  width: 90%;
  max-width: 400px;
  animation: slideUp 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.pwa-prompt-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pwa-prompt-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: white;
  flex-shrink: 0;
}

.pwa-prompt-text {
  flex: 1;
}

.pwa-prompt-text strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 3px;
}

.pwa-prompt-text p {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

.pwa-prompt-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.pwa-btn-install,
.pwa-btn-later {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  flex: 1;
}

.pwa-btn-install {
  background: var(--primary-color);
  color: white;
}

.pwa-btn-later {
  background: rgba(255, 255, 255, 0.1);
  color: var(--light-color);
}

.pwa-btn-install:hover,
.pwa-btn-later:hover {
  transform: translateY(-2px);
}

.pwa-btn-install:active,
.pwa-btn-later:active {
  transform: scale(0.98);
}

/* Offline Indicator */
.offline-indicator {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  background: #ff6b6b;
  color: white;
  text-align: center;
  padding: 8px;
  font-size: 0.85rem;
  z-index: 9999;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    transform: translate(-50%, 100%);
    opacity: 0;
  }
  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

/* PWA Badge */
.pwa-badge {
  position: fixed;
  top: 10px;
  right: 10px;
  background: var(--primary-color);
  color: white;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  z-index: 10000;
  display: none;
}

.pwa-badge.offline {
  background: #ff6b6b;
  display: block;
}

/* Install Instructions */
.install-instructions {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 15px;
  margin: 20px 0;
}

.install-instructions h6 {
  color: var(--primary-color);
  margin-bottom: 10px;
  font-size: 1rem;
}

.install-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.install-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
}

.install-step i {
  color: var(--accent-color);
  width: 20px;
  text-align: center;
}

/* Fullscreen PWA styles */
@media (display-mode: fullscreen) {
  body.mobile-app {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }
}

@media (display-mode: standalone) {
  .bottom-nav {
    height: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
  }
  
  .mobile-nav {
    height: calc(60px + env(safe-area-inset-top));
    padding-top: env(safe-area-inset-top);
  }
  
  body.mobile-app {
    padding-top: calc(60px + env(safe-area-inset-top));
    padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom));
  }
}