/* ========================================
   PROFESSIONAL MOBILE HOMEPAGE STYLES
   Modern, Smooth, User-Friendly Design
   ======================================== */

/* Pull to Refresh */
.pull-to-refresh-indicator {
    position: fixed;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background: rgba(99, 102, 241, 0.95);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    z-index: 9999;
    transition: top 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.pull-to-refresh-indicator.visible {
    top: 80px;
}

.ptr-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.ptr-text {
    font-size: 0.7rem;
    color: white;
    font-weight: 600;
    display: none;
}

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

/* Enhanced Mobile Hero Header - ONLY on mobile */
.mobile-hero-header {
    display: none; /* Desktop'ta gizli */
}

@media (max-width: 768px) {
    .mobile-hero-header {
        display: block; /* Sadece mobilde göster */
        background: linear-gradient(135deg, 
            rgba(99, 102, 241, 0.15) 0%, 
            rgba(139, 92, 246, 0.1) 50%,
            rgba(236, 72, 153, 0.15) 100%);
        border-radius: 0 0 32px 32px;
        padding: 24px 20px 32px;
        margin: -20px -20px 24px;
        position: relative;
        overflow: hidden;
    }
    
    .mobile-hero-bg {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: 
            radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
            radial-gradient(circle at 80% 70%, rgba(236, 72, 153, 0.1) 0%, transparent 50%);
        animation: heroFloat 20s ease-in-out infinite;
    }
    
    @keyframes heroFloat {
        0%, 100% { transform: translate(0, 0) scale(1); }
        50% { transform: translate(-10px, 10px) scale(1.05); }
    }
    
    .mobile-hero-content {
        position: relative;
        z-index: 1;
    }
    
    .mobile-hero-welcome {
        margin-bottom: 20px;
    }
    
    .mobile-hero-greeting {
        display: block;
        font-size: 0.875rem;
        color: rgba(255, 255, 255, 0.7);
        margin-bottom: 8px;
        font-weight: 500;
        animation: fadeInDown 0.6s ease-out;
    }
    
    .mobile-hero-title {
        font-size: 2rem;
        font-weight: 800;
        background: linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        margin: 0;
        animation: fadeInUp 0.6s ease-out 0.1s both;
    }
    
    .mobile-hero-stats {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
        animation: fadeInUp 0.6s ease-out 0.2s both;
    }
    
    .mobile-stat-card {
        background: rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 16px;
        padding: 16px 12px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .mobile-stat-card:active {
        transform: scale(0.95);
        background: rgba(255, 255, 255, 0.08);
    }
    
    .mobile-stat-icon {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.25rem;
        margin-bottom: 4px;
    }
    
    .mobile-stat-icon.manga {
        background: linear-gradient(135deg, #6366f1, #8b5cf6);
        box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    }
    
    .mobile-stat-icon.chapter {
        background: linear-gradient(135deg, #8b5cf6, #ec4899);
        box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
    }
    
    .mobile-stat-icon.user {
        background: linear-gradient(135deg, #ec4899, #f43f5e);
        box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
    }
    
    .mobile-stat-info {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
    }
    
    .mobile-stat-value {
        font-size: 1.25rem;
        font-weight: 700;
        color: white;
        line-height: 1;
    }
    
    .mobile-stat-label {
        font-size: 0.7rem;
        color: rgba(255, 255, 255, 0.6);
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    /* Hide old mobile header */
    .mobile-header {
        display: none;
    }
    
    /* Enhanced Hero Slider for Mobile */
    .hero-slider {
        border-radius: 24px;
        overflow: hidden;
        margin-bottom: 24px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    }
    
    .hero-slide {
        min-height: 400px;
    }
    
    .hero-slide-content {
        padding: 32px 24px;
    }
    
    .hero-title {
        font-size: 1.75rem;
        margin-bottom: 12px;
    }
    
    .hero-description {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    .hero-actions {
        gap: 12px;
        flex-wrap: wrap;
    }
    
    .hero-btn {
        padding: 12px 24px;
        font-size: 0.9rem;
        flex: 1;
        min-width: 140px;
        justify-content: center;
    }
    
    /* Quick Access Enhancement */
    .quick-access {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-bottom: 32px;
    }
    
    .quick-item {
        background: var(--bg-card);
        border: 1px solid var(--border-color);
        border-radius: 16px;
        padding: 16px;
        display: flex;
        align-items: center;
        gap: 12px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
        overflow: hidden;
    }
    
    .quick-item::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, transparent, rgba(99, 102, 241, 0.05));
        opacity: 0;
        transition: opacity 0.3s;
    }
    
    .quick-item:active {
        transform: scale(0.97);
    }
    
    .quick-item:active::before {
        opacity: 1;
    }
    
    .quick-icon {
        width: 48px;
        height: 48px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.25rem;
        flex-shrink: 0;
    }
    
    .quick-text {
        flex: 1;
        min-width: 0;
    }
    
    .quick-title {
        display: block;
        font-size: 0.875rem;
        font-weight: 600;
        color: var(--text-primary);
        margin-bottom: 2px;
    }
    
    .quick-desc {
        display: block;
        font-size: 0.75rem;
        color: var(--text-muted);
    }
    
    /* Section Headers Mobile */
    .section-header {
        margin-bottom: 16px;
        padding: 0 4px;
    }
    
    .section-title {
        font-size: 1.25rem;
        display: flex;
        align-items: center;
        gap: 10px;
    }
    
    .section-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1rem;
    }
    
    /* Enhanced Manga Cards for Mobile - Optimized for Phone Screens */
    .manga-card {
        width: 160px;
        flex-shrink: 0;
        position: relative;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .manga-card:active {
        transform: scale(0.97);
    }
    
    .manga-cover {
        height: 230px;
        border-radius: 20px;
        overflow: hidden;
        position: relative;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
        border: 2px solid rgba(255, 255, 255, 0.05);
    }
    
    .manga-cover::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(
            180deg,
            transparent 0%,
            transparent 50%,
            rgba(0, 0, 0, 0.3) 80%,
            rgba(0, 0, 0, 0.7) 100%
        );
        z-index: 1;
        opacity: 0;
        transition: opacity 0.3s;
    }
    
    .manga-card:active .manga-cover::before {
        opacity: 1;
    }
    
    .manga-cover img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .manga-card:active .manga-cover img {
        transform: scale(1.08);
    }
    
    /* Enhanced Badges */
    .manga-rank {
        position: absolute;
        top: 12px;
        left: 12px;
        width: 36px;
        height: 36px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1rem;
        font-weight: 800;
        z-index: 2;
        backdrop-filter: blur(10px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }
    
    .manga-rank.gold {
        background: linear-gradient(135deg, #ffd700, #ffed4e);
        color: #000;
        box-shadow: 0 4px 16px rgba(255, 215, 0, 0.6);
    }
    
    .manga-rank.silver {
        background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
        color: #000;
        box-shadow: 0 4px 16px rgba(192, 192, 192, 0.6);
    }
    
    .manga-rank.bronze {
        background: linear-gradient(135deg, #cd7f32, #e9a76f);
        color: #000;
        box-shadow: 0 4px 16px rgba(205, 127, 50, 0.6);
    }
    
    .manga-status {
        position: absolute;
        top: 12px;
        right: 12px;
        padding: 6px 12px;
        border-radius: 20px;
        font-size: 0.7rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        z-index: 2;
        backdrop-filter: blur(10px);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }
    
    .manga-status.ongoing {
        background: rgba(16, 185, 129, 0.95);
        color: white;
    }
    
    .manga-status.completed {
        background: rgba(59, 130, 246, 0.95);
        color: white;
    }
    
    .manga-status.hiatus {
        background: rgba(245, 158, 11, 0.95);
        color: white;
    }
    
    .manga-vip {
        position: absolute;
        bottom: 12px;
        left: 12px;
        padding: 6px 12px;
        border-radius: 20px;
        background: linear-gradient(135deg, #8b5cf6, #ec4899);
        color: white;
        font-size: 0.7rem;
        font-weight: 700;
        display: flex;
        align-items: center;
        gap: 4px;
        z-index: 2;
        backdrop-filter: blur(10px);
        box-shadow: 0 4px 12px rgba(139, 92, 246, 0.5);
    }
    
    /* Enhanced Action Buttons */
    .manga-actions {
        position: absolute;
        bottom: 12px;
        right: 12px;
        display: flex;
        gap: 8px;
        z-index: 2;
        opacity: 0;
        transform: translateY(10px);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .manga-card:active .manga-actions {
        opacity: 1;
        transform: translateY(0);
    }
    
    .manga-action-btn {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--text-primary);
        font-size: 1rem;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        transition: all 0.2s;
    }
    
    .manga-action-btn.play {
        background: linear-gradient(135deg, #6366f1, #8b5cf6);
        color: white;
        box-shadow: 0 4px 16px rgba(99, 102, 241, 0.5);
    }
    
    .manga-action-btn:active {
        transform: scale(0.9);
    }
    
    /* Enhanced Info Section */
    .manga-info {
        padding: 14px 6px 0;
    }
    
    .manga-title {
        margin-bottom: 8px;
    }
    
    .manga-title a {
        font-size: 0.95rem;
        font-weight: 600;
        line-height: 1.4;
        color: var(--text-primary);
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        transition: color 0.2s;
    }
    
    .manga-card:active .manga-title a {
        color: var(--primary-color);
    }
    
    .manga-meta {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
        margin-top: 8px;
    }
    
    .manga-meta-item {
        display: flex;
        align-items: center;
        gap: 4px;
        font-size: 0.8rem;
        color: var(--text-muted);
        padding: 4px 8px;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 8px;
        backdrop-filter: blur(5px);
    }
    
    .manga-meta-item.rating {
        color: #fbbf24;
        background: rgba(251, 191, 36, 0.1);
    }
    
    .manga-meta-item i {
        font-size: 0.75rem;
    }
    
    /* Horizontal Slider Mobile */
    .horizontal-slider-wrapper {
        position: relative;
        margin: 0 -20px 32px;
        padding: 0 20px;
    }
    
    .horizontal-slider {
        display: flex;
        gap: 16px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 4px 0 16px;
    }
    
    .horizontal-slider::-webkit-scrollbar {
        display: none;
    }
    
    .horizontal-slider > * {
        scroll-snap-align: start;
    }
    
    /* Scroll Indicator */
    .horizontal-slider::after {
        content: '';
        position: absolute;
        right: 0;
        top: 0;
        bottom: 16px;
        width: 40px;
        background: linear-gradient(to left, var(--bg-primary), transparent);
        pointer-events: none;
        opacity: 1;
        transition: opacity 0.3s;
    }
    
    .horizontal-slider.scrolled-end::after {
        opacity: 0;
    }
    
    /* Hide desktop slider buttons on mobile */
    .slider-nav-btn {
        display: none !important;
    }
    
    /* Updates Container Mobile */
    .updates-container {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 32px;
    }
    
    .update-card {
        background: var(--bg-card);
        border: 1px solid var(--border-color);
        border-radius: 16px;
        padding: 12px;
        display: flex;
        gap: 12px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .update-card:active {
        transform: scale(0.98);
        background: var(--bg-secondary);
    }
    
    .update-cover {
        width: 60px;
        height: 80px;
        border-radius: 10px;
        object-fit: cover;
        flex-shrink: 0;
    }
    
    .update-info {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 6px;
    }
    
    .update-manga-title a {
        font-size: 0.9rem;
        font-weight: 600;
        color: var(--text-primary);
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .update-chapter {
        font-size: 0.85rem;
        color: var(--primary-color);
        display: flex;
        align-items: center;
        gap: 6px;
    }
    
    .update-time {
        font-size: 0.75rem;
        color: var(--text-muted);
        display: flex;
        align-items: center;
        gap: 4px;
    }
    
    /* Genres Grid Mobile */
    .genres-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-bottom: 32px;
    }
    
    .genre-card {
        background: var(--bg-card);
        border: 1px solid var(--border-color);
        border-radius: 16px;
        padding: 20px 16px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
        overflow: hidden;
    }
    
    .genre-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, transparent, rgba(99, 102, 241, 0.05));
        opacity: 0;
        transition: opacity 0.3s;
    }
    
    .genre-card:active {
        transform: scale(0.97);
    }
    
    .genre-card:active::before {
        opacity: 1;
    }
    
    .genre-icon {
        width: 48px;
        height: 48px;
        border-radius: 12px;
        background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2));
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.25rem;
        color: var(--primary-color);
    }
    
    .genre-name {
        font-size: 0.9rem;
        font-weight: 600;
        color: var(--text-primary);
        text-align: center;
    }
    
    .genre-count {
        font-size: 0.75rem;
        color: var(--text-muted);
    }
    
    /* Continue Reading Mobile */
    .continue-section {
        margin-bottom: 32px;
    }
    
    .continue-badge {
        position: absolute;
        top: 12px;
        right: 12px;
        background: rgba(99, 102, 241, 0.95);
        backdrop-filter: blur(10px);
        padding: 6px 12px;
        border-radius: 20px;
        font-size: 0.75rem;
        font-weight: 600;
        color: white;
        display: flex;
        align-items: center;
        gap: 6px;
        box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
    }
    
    .continue-progress-bar {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: rgba(0, 0, 0, 0.3);
    }
    
    .continue-progress-fill {
        height: 100%;
        background: linear-gradient(90deg, #6366f1, #8b5cf6);
        transition: width 0.3s;
    }
    
    /* Content Type Badges */
    .content-type-badge {
        position: absolute;
        top: 12px;
        left: 12px;
        padding: 6px 10px;
        border-radius: 8px;
        font-size: 0.7rem;
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 4px;
        backdrop-filter: blur(10px);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }
    
    .content-type-badge.manga {
        background: rgba(99, 102, 241, 0.95);
        color: white;
    }
    
    .content-type-badge.webtoon {
        background: rgba(139, 92, 246, 0.95);
        color: white;
    }
    
    .content-type-badge.novel {
        background: rgba(236, 72, 153, 0.95);
        color: white;
    }
    
    /* Empty State Mobile */
    .empty-state {
        text-align: center;
        padding: 48px 24px;
        background: var(--bg-card);
        border: 1px solid var(--border-color);
        border-radius: 20px;
        margin-bottom: 32px;
    }
    
    .empty-icon {
        font-size: 4rem;
        margin-bottom: 16px;
        opacity: 0.5;
    }
    
    .empty-title {
        font-size: 1.1rem;
        font-weight: 600;
        color: var(--text-primary);
        margin-bottom: 8px;
    }
    
    .empty-desc {
        font-size: 0.875rem;
        color: var(--text-muted);
        line-height: 1.5;
    }
    
    /* Animations */
    @keyframes fadeInDown {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    /* Loading Skeleton */
    .skeleton {
        background: linear-gradient(
            90deg,
            var(--bg-secondary) 25%,
            var(--bg-card) 50%,
            var(--bg-secondary) 75%
        );
        background-size: 200% 100%;
        animation: loading 1.5s ease-in-out infinite;
    }
    
    @keyframes loading {
        0% { background-position: 200% 0; }
        100% { background-position: -200% 0; }
    }
    
    /* Smooth Scroll */
    html {
        scroll-behavior: smooth;
    }
    
    /* Touch Feedback */
    * {
        -webkit-tap-highlight-color: rgba(99, 102, 241, 0.1);
    }
    
    /* Container Padding */
    .container {
        padding: 20px;
    }
}

/* Tablet Adjustments (768px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .mobile-hero-header {
        display: none;
    }
    
    .quick-access {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .manga-card {
        width: 160px;
    }
    
    .genres-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
