/* ============================================================
   TürkAPK - Premium modern Design System & Style Guide
   Designed for APK Downloads, Gamers & Tech Enthusiasts
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-surface: #f1f5f9;
    --border: #e2e8f0;
    --border-hover: #cbd5e1;
    
    --primary: #5177fc;
    --primary-gradient: linear-gradient(135deg, #5177fc, #7c3aed);
    --primary-hover: #3b5bdb;
    --primary-muted: rgba(81, 119, 252, 0.1);
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --success: #10b981;
    --success-muted: rgba(16, 185, 129, 0.1);
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.02);
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 20px 40px rgba(15, 23, 42, 0.06);
    
    --radius-sm: 10px;
    --radius: 18px;
    --radius-lg: 28px;
    --radius-full: 9999px;
    
    --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Koyu Tema Ayarları (Dark Mode Override) */
body.dark {
    --bg-primary: #090d16;
    --bg-secondary: #0f172a;
    --bg-card: #1e293b;
    --bg-surface: #1e293b;
    --border: rgba(255, 255, 255, 0.05);
    --border-hover: rgba(255, 255, 255, 0.1);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* ---- Temel Yapı ---- */
body {
    font-family: 'Outfit', -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
}

/* ---- Hero Section (Degrade Gölgeli ve Premium) ---- */
.hero-section {
    padding: 90px 0 70px;
    text-align: center;
    background: radial-gradient(circle at top, rgba(81, 119, 252, 0.08) 0%, transparent 60%);
    position: relative;
    overflow: hidden;
}
body.dark .hero-section {
    background: radial-gradient(circle at top, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
}
.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1.15;
    margin-bottom: 20px;
}
.hero-title span {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 650px;
    margin: 0 auto 40px;
    font-weight: 500;
    line-height: 1.5;
}

/* Arama Çubuğu */
.hero-search {
    display: flex;
    max-width: 600px;
    margin: 0 auto 50px;
    background: var(--bg-secondary);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-full);
    padding: 6px;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}
.hero-search:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-muted);
}
.hero-search input {
    flex: 1;
    padding: 12px 24px;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 1.05rem;
    font-weight: 500;
}
.hero-search input::placeholder {
    color: var(--text-muted);
}
.hero-search button {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}
.hero-search button:hover {
    transform: scale(1.05);
}

/* İstatistikler */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 20px;
}
.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.hero-stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}
.hero-stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    margin-top: 4px;
}

/* ---- Kategori Kartları ---- */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 20px;
    margin-top: 30px;
}
.category-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}
.category-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}
.category-icon {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: var(--primary-muted);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 15px;
    transition: var(--transition);
}
.category-card:hover .category-icon {
    background: var(--primary-gradient);
    color: #ffffff;
}
.category-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}
.category-count {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* ---- Uygulama Kartları Grid ---- */
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

/* Tekli Uygulama Kartı */
.app-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}
.app-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}
.app-card-body {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 15px;
}
.app-card-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    object-fit: cover;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.app-card-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.app-card-title {
    font-size: 1.15rem;
    font-weight: 750;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.app-card-category {
    font-size: 0.82rem;
    color: var(--primary);
    font-weight: 700;
}
.app-card-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.app-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border);
    padding-top: 15px;
    margin-top: auto;
}
.app-card-meta {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 600;
}
.app-card-download-btn {
    padding: 8px 16px;
    border-radius: var(--radius-full);
    background: var(--primary-muted);
    color: var(--primary) !important;
    font-weight: 750;
    font-size: 0.85rem;
    transition: var(--transition);
}
.app-card:hover .app-card-download-btn {
    background: var(--primary-gradient);
    color: #ffffff !important;
}

/* ---- Uygulama Detay Sayfası ---- */
.app-detail {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow);
    margin-top: 25px;
}
.app-detail-header {
    display: flex;
    gap: 35px;
    align-items: flex-start;
}
@media (max-width: 768px) {
    .app-detail-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}
.app-detail-icon {
    width: 140px;
    height: 140px;
    border-radius: 32px;
    object-fit: cover;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
}
.app-detail-info {
    flex: 1;
}
.app-detail-title {
    font-size: 2.2rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.2;
}
.app-detail-developer {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 15px;
}

/* Rozetler */
.app-detail-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}
@media (max-width: 768px) {
    .app-detail-badges {
        justify-content: center;
    }
}
.app-detail-badges .badge {
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 750;
    border-radius: var(--radius-full);
}
.badge-verified {
    background: var(--success-muted);
    color: var(--success);
}
.badge-editors-choice {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

/* Meta Tablosu */
.app-detail-meta {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 30px;
    background: var(--bg-primary);
}
@media (max-width: 576px) {
    .app-detail-meta {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}
.app-detail-meta-item {
    text-align: center;
}
.app-detail-meta-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.app-detail-meta-value {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-primary);
}

/* İndir Butonları */
.app-detail-actions {
    display: flex;
    gap: 15px;
}
@media (max-width: 768px) {
    .app-detail-actions {
        justify-content: center;
    }
}
.btn-download {
    background: var(--primary-gradient);
    color: #ffffff !important;
    font-weight: 800;
    font-size: 1.05rem;
    padding: 14px 35px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 10px 20px rgba(81, 119, 252, 0.2);
    transition: var(--transition);
}
.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px rgba(81, 119, 252, 0.35);
}

/* Ekran Görüntüleri */
.screenshots-section {
    margin-top: 40px;
    border-top: 1px solid var(--border);
    padding-top: 35px;
}
.app-detail-section-title {
    font-size: 1.35rem;
    font-weight: 850;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 20px;
}
.screenshots-scroll {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 15px;
    scroll-snap-type: x mandatory;
}
.screenshots-scroll::-webkit-scrollbar {
    height: 6px;
}
.screenshots-scroll::-webkit-scrollbar-track {
    background: var(--bg-primary);
    border-radius: 10px;
}
.screenshots-scroll::-webkit-scrollbar-thumb {
    background: var(--border-hover);
    border-radius: 10px;
}
.screenshot-item {
    scroll-snap-align: start;
    flex-shrink: 0;
    max-height: 320px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.screenshot-item img {
    height: 320px;
    width: auto;
    object-fit: contain;
    display: block;
}

/* Sürüm Geçmişi */
.version-history {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.version-item {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.version-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.version-number {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-primary);
}
.version-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}
.version-changelog {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 8px;
    line-height: 1.4;
}

/* ---- Breadcrumb ---- */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 10px;
    background: transparent;
    padding: 0;
}
.breadcrumb a {
    color: var(--text-muted);
}
.breadcrumb a:hover {
    color: var(--primary);
}
.breadcrumb span {
    color: var(--text-muted);
}

.pagination {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-secondary);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    border: 1.5px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition);
}
.pagination a:hover {
    background: var(--bg-surface);
    color: var(--primary);
}
.pagination a.active {
    background: var(--primary-gradient);
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(81, 119, 252, 0.25);
}
