/* ============================================
   APK İndirme Sayfası Stilleri
   ============================================ */

/* --- Hero Section --- */
.apk-hero {
    text-align: center;
    padding: 50px 0 40px;
    position: relative;
}

.apk-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.apk-hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    color: var(--text-main, #1e293b);
    margin: 0 0 12px;
    position: relative;
    z-index: 1;
}

.apk-hero p {
    font-size: 1.1rem;
    color: var(--text-muted, #64748b);
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* --- Kategori Filtreleri --- */
.apk-categories {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 35px;
    flex-wrap: wrap;
    padding: 0 20px;
}

.apk-cat-btn {
    padding: 8px 20px;
    background: var(--surface-card, white);
    border: 2px solid var(--border-color, #e2e8f0);
    border-radius: 50px;
    color: var(--text-secondary, #64748b);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

.apk-cat-btn:hover {
    border-color: #6366f1;
    color: #6366f1;
    transform: translateY(-1px);
}

.apk-cat-btn.active {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}

/* --- Arama Kutusu --- */
.apk-search {
    max-width: 500px;
    margin: 0 auto 35px;
    position: relative;
}

.apk-search input {
    width: 100%;
    padding: 14px 50px 14px 20px;
    border: 2px solid var(--border-color, #e2e8f0);
    border-radius: 50px;
    font-size: 1rem;
    background: var(--surface-card, white);
    color: var(--text-main, #1e293b);
    transition: border-color 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
}

.apk-search input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    outline: none;
}

.apk-search-icon {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1.1rem;
}

/* --- Öne Çıkan Bölümü --- */
.apk-featured-section {
    margin-bottom: 40px;
}

.apk-featured-section h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-main, #1e293b);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* --- Uygulama Grid --- */
.apk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

/* --- Uygulama Kartı --- */
.apk-card {
    background: var(--surface-card, white);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.apk-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

.apk-card.featured {
    border-color: rgba(99, 102, 241, 0.3);
    background: linear-gradient(145deg, var(--surface-card, white) 0%, rgba(99, 102, 241, 0.03) 100%);
}

.apk-card.featured::before {
    content: '⭐ Öne Çıkan';
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 2;
}

.apk-card-inner {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    position: relative;
}

.apk-card-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.apk-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.apk-icon-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.apk-card-info h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main, #1e293b);
    margin: 0 0 6px;
    line-height: 1.3;
}

.apk-card-info h3 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.apk-card-info h3 a:hover {
    color: #6366f1;
}

.apk-card-meta {
    display: flex;
    gap: 12px;
    font-size: 0.82rem;
    color: var(--text-muted, #94a3b8);
    flex-wrap: wrap;
}

.apk-card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.apk-card-desc {
    font-size: 0.92rem;
    color: var(--text-secondary, #64748b);
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.apk-card-category {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(99, 102, 241, 0.08);
    color: #6366f1;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.apk-card-footer {
    border-top: 1px solid var(--border-color, #e2e8f0);
    padding-top: 16px;
    margin-top: auto;
}

.apk-card-footer a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.apk-card-footer a:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

/* --- Detay Sayfası --- */
.apk-detail-header {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    padding: 40px 0;
    flex-wrap: wrap;
}

.apk-detail-icon {
    width: 120px;
    height: 120px;
    border-radius: 28px;
    object-fit: cover;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    flex-shrink: 0;
}

.apk-detail-icon-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 28px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 52px;
    flex-shrink: 0;
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.3);
}

.apk-detail-info {
    flex: 1;
    min-width: 250px;
}

.apk-detail-info h1 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 800;
    margin: 0 0 10px;
    color: var(--text-main, #1e293b);
}

.apk-detail-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--text-muted, #64748b);
}

.apk-detail-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.apk-detail-meta .meta-icon {
    width: 18px;
    height: 18px;
    fill: #6366f1;
}

.apk-rating-stars {
    color: #f59e0b;
    font-size: 1.1rem;
    letter-spacing: 2px;
}

/* --- Download Buttons --- */
.apk-download-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin: 24px 0;
}

.apk-btn-download {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 28px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.apk-btn-google-play {
    background: linear-gradient(135deg, #1a73e8, #0d47a1);
    color: white;
    box-shadow: 0 4px 20px rgba(26, 115, 232, 0.35);
}

.apk-btn-google-play:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(26, 115, 232, 0.45);
}

.apk-btn-direct {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.35);
}

.apk-btn-direct:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.45);
}

.apk-btn-icon {
    font-size: 1.4rem;
}

.apk-btn-text strong {
    display: block;
    font-size: 1rem;
}

.apk-btn-text small {
    font-size: 0.78rem;
    opacity: 0.85;
    font-weight: 400;
}

/* --- Screenshots Gallery --- */
.apk-screenshots {
    margin: 40px 0;
}

.apk-screenshots h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-main, #1e293b);
}

.apk-screenshots-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 16px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.apk-screenshots-scroll::-webkit-scrollbar {
    height: 6px;
}

.apk-screenshots-scroll::-webkit-scrollbar-track {
    background: var(--bg-body, #f1f5f9);
    border-radius: 3px;
}

.apk-screenshots-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.apk-screenshot-img {
    height: 280px;
    border-radius: 12px;
    object-fit: cover;
    scroll-snap-align: start;
    flex-shrink: 0;
    border: 1px solid var(--border-color, #e2e8f0);
    transition: transform 0.3s;
}

.apk-screenshot-img:hover {
    transform: scale(1.02);
}

/* --- Teknik Bilgiler Tablosu --- */
.apk-tech-info {
    margin: 40px 0;
}

.apk-tech-info h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-main, #1e293b);
}

.apk-tech-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface-card, white);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color, #e2e8f0);
}

.apk-tech-table tr {
    border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.apk-tech-table tr:last-child {
    border-bottom: none;
}

.apk-tech-table td {
    padding: 14px 20px;
    font-size: 0.95rem;
}

.apk-tech-table td:first-child {
    font-weight: 600;
    color: var(--text-muted, #64748b);
    width: 180px;
    background: rgba(0, 0, 0, 0.02);
}

.apk-tech-table td:last-child {
    color: var(--text-main, #1e293b);
}

/* --- Description Section --- */
.apk-description {
    margin: 40px 0;
    line-height: 1.8;
}

.apk-description h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-main, #1e293b);
}

.apk-description-content {
    background: var(--surface-card, white);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid var(--border-color, #e2e8f0);
    color: var(--text-secondary, #475569);
    font-size: 1rem;
}

.apk-description-content h2,
.apk-description-content h3 {
    color: var(--text-main, #1e293b);
    margin-top: 20px;
}

.apk-description-content ul,
.apk-description-content ol {
    padding-left: 20px;
}

/* --- İlgili Uygulamalar --- */
.apk-related {
    margin: 50px 0;
    padding-top: 30px;
    border-top: 1px solid var(--border-color, #e2e8f0);
}

.apk-related h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-main, #1e293b);
}

/* --- Pagination --- */
.apk-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 40px 0;
}

.apk-pagination a,
.apk-pagination span {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--surface-card, white);
    color: var(--text-main, #1e293b);
    text-decoration: none;
    transition: all 0.3s;
    border: 1px solid var(--border-color, #e2e8f0);
    font-weight: 600;
    font-size: 0.9rem;
}

.apk-pagination a:hover,
.apk-pagination a.active {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}

/* --- Empty State --- */
.apk-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted, #94a3b8);
}

.apk-empty-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.apk-empty h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: var(--text-secondary, #64748b);
}

/* --- Dark Mode --- */
[data-theme="dark"] .apk-card {
    background: var(--surface-card, #161b22);
    border-color: var(--border-color, #30363d);
}

[data-theme="dark"] .apk-cat-btn {
    background: var(--surface-card, #161b22);
    border-color: var(--border-color, #30363d);
    color: var(--text-muted, #8b949e);
}

[data-theme="dark"] .apk-search input {
    background: var(--surface-card, #161b22);
    border-color: var(--border-color, #30363d);
    color: var(--text-main, #f0f6fc);
}

[data-theme="dark"] .apk-tech-table {
    background: var(--surface-card, #161b22);
    border-color: var(--border-color, #30363d);
}

[data-theme="dark"] .apk-description-content {
    background: var(--surface-card, #161b22);
    border-color: var(--border-color, #30363d);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .apk-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .apk-detail-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .apk-detail-meta {
        justify-content: center;
    }

    .apk-download-buttons {
        flex-direction: column;
    }

    .apk-btn-download {
        justify-content: center;
    }

    .apk-screenshot-img {
        height: 200px;
    }

    .apk-tech-table td:first-child {
        width: 120px;
    }
}
