/*
 * Modern Download Blog Theme
 * Google PageSpeed Optimized
 * Mobile First Design
 */

/* CSS Variables - Kolay tema değişikliği için */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1e293b;
    --light: #f8fafc;
    --white: #ffffff;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'Fira Code', monospace;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    --transition: all 0.2s ease;
}

/* Dark Mode */
[data-theme="dark"] {
    --primary: #3b82f6;
    --dark: #f8fafc;
    --light: #0f172a;
    --white: #1e293b;
    --gray-100: #1e293b;
    --gray-200: #334155;
    --gray-300: #475569;
    --gray-400: #64748b;
    --gray-500: #94a3b8;
    --gray-600: #cbd5e1;
    --gray-700: #e2e8f0;
    --gray-800: #f1f5f9;
    --gray-900: #f8fafc;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--gray-800);
    background: var(--light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--gray-900);
    margin-bottom: 0.5em;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p { margin-bottom: 1rem; }

/* Container */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    overflow-x: hidden;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    gap: 0.5rem;
}

.logo {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    white-space: nowrap;
}

.logo svg {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

/* Navigation */
.nav {
    display: none;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border-radius: var(--radius);
    color: var(--gray-600);
    font-weight: 500;
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    background: var(--gray-100);
    color: var(--primary);
}

.nav-link svg {
    width: 18px;
    height: 18px;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--gray-100);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.menu-toggle:hover {
    background: var(--gray-200);
}

.menu-toggle svg {
    width: 24px;
    height: 24px;
    color: var(--gray-700);
}

/* Search Box */
.search-box {
    display: none;
    align-items: center;
    background: var(--gray-100);
    border-radius: var(--radius);
    padding: 0.5rem 1rem;
    flex: 1;
    max-width: 400px;
}

.search-box input {
    flex: 1;
    border: none;
    background: none;
    outline: none;
    font-size: 0.875rem;
    color: var(--gray-800);
}

.search-box input::placeholder {
    color: var(--gray-400);
}

.search-box button {
    border: none;
    background: none;
    cursor: pointer;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    min-width: 44px;
    min-height: 44px;
}

.search-box input {
    min-height: 44px;
}

.search-box button:hover {
    color: var(--primary);
}

/* Theme Toggle */
.theme-toggle {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--gray-100);
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.theme-toggle:hover {
    background: var(--gray-200);
}

/* Mobile Nav */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--white);
    z-index: 200;
    padding: 1rem;
    flex-direction: column;
}

.mobile-nav.active {
    display: flex;
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.mobile-nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: var(--radius);
    color: var(--gray-700);
    font-weight: 500;
    font-size: 1.125rem;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    background: var(--gray-100);
    color: var(--primary);
}

/* Main Content */
.main {
    flex: 1;
    padding: 2rem 0;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 3rem 1rem;
    text-align: center;
    margin-bottom: 2rem;
    border-radius: var(--radius-xl);
}

.hero h1 {
    color: var(--white);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.hero p {
    opacity: 0.9;
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.hero-stats span {
    font-size: 0.875rem;
    opacity: 0.9;
}

.hero-stats strong {
    font-weight: 700;
    font-size: 1rem;
}

.hero-search {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
}

.hero-search input {
    flex: 1;
    padding: 1rem;
    border: none;
    outline: none;
    font-size: 1rem;
    color: var(--gray-800);
}

.hero-search button {
    padding: 1rem 1.5rem;
    background: var(--primary-dark);
    border: none;
    color: var(--white);
    cursor: pointer;
    transition: var(--transition);
    min-width: 48px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-search button:hover {
    background: var(--gray-900);
}

/* Categories Bar */
.categories-bar {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.5rem 0;
    margin-bottom: 2rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.categories-bar::-webkit-scrollbar {
    display: none;
}

.category-chip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 50px;
    white-space: nowrap;
    color: var(--gray-600);
    font-weight: 500;
    font-size: 0.875rem;
    transition: var(--transition);
}

.category-chip:hover,
.category-chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.category-chip svg {
    width: 16px;
    height: 16px;
}

/* Grid Layout */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Card */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-image {
    position: relative;
    display: block;
    padding-top: 75%; /* Daha kare oranlı - icon gibi */
    background: var(--gray-200);
    overflow: hidden;
}

.card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
    /* Prevent image copy/drag */
    -webkit-user-drag: none;
    user-select: none;
}

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

.card-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.25rem 0.75rem;
    background: var(--primary);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50px;
    z-index: 1;
}

.card-body {
    padding: 1rem;
}

.card-category {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-title a {
    color: var(--gray-900);
}

.card-title a:hover {
    color: var(--primary);
}

.card-excerpt {
    font-size: 0.875rem;
    color: var(--gray-500);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 1rem;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--gray-400);
}

.card-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.card-meta svg {
    width: 14px;
    height: 14px;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-100);
}

/* Button */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn svg {
    width: 18px;
    height: 18px;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    color: var(--white);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-success:hover {
    background: #059669;
    color: var(--white);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--gray-300);
    color: var(--gray-600);
}

.btn-outline:hover {
    background: var(--gray-100);
    border-color: var(--gray-400);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
}

/* Section Title */
.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.section-title h2 {
    font-size: 1.5rem;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title h2 svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.widget {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow);
}

.widget-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--gray-100);
}

.widget-list {
    list-style: none;
}

.widget-list li {
    border-bottom: 1px solid var(--gray-100);
}

.widget-list li:last-child {
    border-bottom: none;
}

.widget-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    color: var(--gray-600);
}

.widget-list a:hover {
    color: var(--primary);
}

.widget-list .count {
    background: var(--gray-100);
    padding: 0.125rem 0.5rem;
    border-radius: 50px;
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* Post Card - List Style with Small Icon */
.posts-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.post-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.post-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.post-card-image {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    border-radius: 14px;
    overflow: hidden;
    background: var(--gray-100);
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    -webkit-user-drag: none;
    user-select: none;
    pointer-events: none;
}

.post-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gray-100), var(--gray-200));
    color: var(--gray-400);
}

.post-card-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-width: 0;
}

.post-card-info {
    flex: 1;
    min-width: 0;
}

.post-card-category {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.post-card-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.35rem 0;
    line-height: 1.3;
}

.post-card-title a {
    color: var(--gray-800);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-title a:hover {
    color: var(--primary);
}

.post-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--gray-500);
}

.post-card-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.post-card-downloads svg,
.post-card-rating svg {
    flex-shrink: 0;
}

.post-card-download-btn {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 10px;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.post-card-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
    color: white;
}

.post-card-download-btn svg {
    flex-shrink: 0;
}

/* Mobile responsive for post-card */
@media (max-width: 640px) {
    .post-card {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .post-card-image {
        width: 60px;
        height: 60px;
        margin: 0 auto;
    }

    .post-card-content {
        flex-direction: column;
        gap: 0.75rem;
    }

    .post-card-meta {
        justify-content: center;
    }

    .post-card-download-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Widget Posts with Images */
.widget-posts {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.widget-post-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: var(--radius);
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
}

.widget-post-item:hover {
    background: var(--gray-100);
}

.widget-post-image {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--gray-100);
}

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

.widget-post-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
}

.widget-post-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.widget-post-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-800);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.widget-post-meta {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

/* Post Detail */
.post-detail {
    background: var(--white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.post-header {
    position: relative;
}

.post-featured-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    /* Prevent image copy/drag */
    -webkit-user-drag: none;
    user-select: none;
}

.post-info {
    padding: 1.5rem;
}

.post-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--primary);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50px;
    margin-bottom: 1rem;
}

.post-title {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.post-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-500);
}

.post-meta-item svg {
    width: 16px;
    height: 16px;
}

.post-content {
    padding: 0 1.5rem 1.5rem;
    line-height: 1.8;
}

.post-content h2,
.post-content h3 {
    margin-top: 2rem;
}

.post-content img {
    border-radius: var(--radius);
    margin: 1.5rem 0;
}

.post-content ul,
.post-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

/* Download Box */
.download-box {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin: 1.5rem;
    color: var(--white);
}

.download-box-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.download-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.download-info-item {
    font-size: 0.875rem;
}

.download-info-item strong {
    display: block;
    font-size: 0.75rem;
    opacity: 0.8;
    margin-bottom: 0.25rem;
}

.download-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.download-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: var(--white);
    color: var(--success);
    font-weight: 600;
    border-radius: var(--radius);
    transition: var(--transition);
}

.download-link:hover {
    background: var(--gray-100);
    color: #059669;
    transform: translateY(-2px);
}

.download-link svg {
    width: 20px;
    height: 20px;
}

/* Rating */
.rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.rating svg {
    width: 16px;
    height: 16px;
    color: var(--warning);
    fill: var(--warning);
}

.rating svg.empty {
    color: var(--gray-300);
    fill: transparent;
    stroke: var(--gray-300);
}

.rating-value {
    margin-left: 0.5rem;
    font-weight: 600;
    color: var(--gray-700);
}

/* Screenshots Gallery */
.screenshots {
    margin: 1.5rem;
}

.screenshots-title {
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.screenshot-item {
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
}

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

.screenshot-item img {
    width: 100%;
    height: 80px;
    object-fit: cover;
}

/* Breadcrumb */
.breadcrumb {
    margin-bottom: 1.5rem;
}

.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.breadcrumb li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumb li:not(:last-child)::after {
    content: '/';
    color: var(--gray-400);
}

.breadcrumb a {
    color: var(--gray-500);
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb li:last-child {
    color: var(--gray-700);
    font-weight: 500;
}

/* Pagination */
.pagination {
    margin-top: 2rem;
}

.pagination-list {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
}

.pagination-list li a,
.pagination-list li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    color: var(--gray-600);
    font-weight: 500;
    transition: var(--transition);
}

.pagination-list li a:hover {
    background: var(--gray-100);
    border-color: var(--gray-300);
}

.pagination-list li.active a {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.pagination-ellipsis {
    border: none !important;
    background: none !important;
}

/* Footer */
.footer {
    background: var(--gray-900);
    color: var(--gray-400);
    padding: 3rem 0 1.5rem;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-title {
    color: var(--white);
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

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

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

.footer-links a {
    color: var(--gray-400);
}

.footer-links a:hover {
    color: var(--white);
}

.footer-bottom {
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-800);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.footer-copyright {
    font-size: 0.875rem;
}

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

.footer-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-800);
    border-radius: var(--radius);
    color: var(--gray-400);
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--primary);
    color: var(--white);
}

/* AdSense Placeholders */
.ad-banner {
    background: var(--gray-100);
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius);
    padding: 1rem;
    text-align: center;
    color: var(--gray-400);
    font-size: 0.875rem;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1.5rem 0;
}

/* Alert */
.alert {
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* Form Elements */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--gray-700);
}

.form-control {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--gray-800);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    padding: 0.25rem 0.75rem;
    background: var(--gray-100);
    color: var(--gray-600);
    font-size: 0.75rem;
    border-radius: 50px;
    transition: var(--transition);
}

.tag:hover {
    background: var(--primary);
    color: var(--white);
}

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

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

/* Responsive */
@media (min-width: 640px) {
    .hero h1 { font-size: 2.5rem; }
    .screenshots-grid { grid-template-columns: repeat(4, 1fr); }
    .screenshot-item img { height: 100px; }
    .download-info { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 768px) {
    .nav { display: block; }
    .menu-toggle { display: none; }
    .search-box { display: flex; }
    .grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .post-featured-image { height: 400px; }
    .logo { font-size: 1.5rem; }
    .logo svg { width: 32px; height: 32px; }
    .header-inner { gap: 1rem; }
}

@media (min-width: 1024px) {
    .grid { grid-template-columns: repeat(3, 1fr); }
    .footer-grid { grid-template-columns: repeat(4, 1fr); }

    .content-wrapper {
        display: grid;
        grid-template-columns: 1fr 300px;
        gap: 2rem;
    }

    .hero {
        padding: 4rem 2rem;
    }

    .hero h1 {
        font-size: 3rem;
    }
}

@media (min-width: 1280px) {
    .grid { grid-template-columns: repeat(4, 1fr); }
    .content-wrapper { grid-template-columns: 1fr 340px; }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.hidden { display: none; }
.visible { display: block; }

/* ========================================
   Homepage Section Styles
   ======================================== */

/* Card Compact - 4 column grid */
.card-compact {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.card-compact:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-compact .card-image {
    display: block;
    position: relative;
    padding-top: 100%;
    background: var(--gray-200);
    overflow: hidden;
}

.card-compact .card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    -webkit-user-drag: none;
    user-select: none;
}

.card-compact .card-body {
    padding: 0.75rem;
}

.card-compact .card-title {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.card-title-sm {
    font-size: 0.875rem !important;
    line-height: 1.3;
    -webkit-line-clamp: 2;
}

/* Square card image */
.card-image-square {
    padding-top: 100% !important;
}

/* Card hover effect */
.card-hover {
    cursor: pointer;
}

.card-hover:hover {
    transform: translateY(-6px) scale(1.02);
}

/* Fire badge for top downloads */
.card-badge-fire {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Small category label */
.card-category-small {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
    display: block;
}

/* Card rating inline */
.card-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-600);
}

/* Section with gradient background */
.section-gradient {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(139, 92, 246, 0.05));
    padding: 1.5rem;
    border-radius: var(--radius-xl);
    margin-left: -1rem;
    margin-right: -1rem;
}

/* Trending Grid */
.trending-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.trending-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    text-decoration: none;
}

.trending-item:hover {
    background: var(--gray-100);
    transform: translateX(4px);
}

.trending-rank {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 50%;
    flex-shrink: 0;
}

.trending-item:nth-child(1) .trending-rank { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.trending-item:nth-child(2) .trending-rank { background: linear-gradient(135deg, #64748b, #475569); }
.trending-item:nth-child(3) .trending-rank { background: linear-gradient(135deg, #cd7f32, #8b4513); }

.trending-image {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--gray-200);
}

.trending-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    -webkit-user-drag: none;
    user-select: none;
    pointer-events: none;
}

.trending-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
}

.trending-info {
    flex: 1;
    min-width: 0;
}

.trending-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-800);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trending-meta {
    font-size: 0.7rem;
    color: var(--gray-400);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.25rem;
}

/* Random Games Widget (Sidebar) */
.widget-random {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(59, 130, 246, 0.1));
}

.widget-random .widget-title {
    color: #7c3aed;
}

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

.random-game-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem;
    background: var(--white);
    border-radius: var(--radius);
    transition: var(--transition);
    text-decoration: none;
}

.random-game-item:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.random-game-image {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 0.375rem;
    background: var(--gray-200);
}

.random-game-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    -webkit-user-drag: none;
    user-select: none;
    pointer-events: none;
}

.random-game-title {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--gray-700);
    text-align: center;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Responsive adjustments for new sections */
@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }
    .trending-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    .section-gradient {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
        padding: 1rem;
    }
    .random-games-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    .card-compact .card-body {
        padding: 0.5rem;
    }
    .card-title-sm {
        font-size: 0.75rem !important;
    }
}

/* ========================================
   Sidebar Widget Styles
   ======================================== */

/* Widget Featured Card */
.widget-featured {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
}

.widget-featured .widget-title {
    color: white;
    border-color: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.widget-featured-card {
    display: block;
    text-decoration: none;
    transition: var(--transition);
}

.widget-featured-card:hover {
    transform: scale(1.02);
}

.widget-featured-image {
    width: 100%;
    height: 120px;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 0.75rem;
    background: rgba(255,255,255,0.1);
}

.widget-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    -webkit-user-drag: none;
    user-select: none;
}

.widget-featured-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.5);
}

.widget-featured-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.widget-featured-category {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.8;
}

.widget-featured-title {
    font-size: 1rem;
    font-weight: 600;
    color: white;
    line-height: 1.3;
}

.widget-featured-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: rgba(255,255,255,0.9);
}

/* Widget Statistics */
.widget-stats {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: white;
}

.widget-stats .widget-title {
    color: white;
    border-color: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.stat-item {
    text-align: center;
    padding: 0.75rem;
    background: rgba(255,255,255,0.1);
    border-radius: var(--radius);
}

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

.stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.8;
}

/* Widget Post Rank */
.widget-post-rank {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 50%;
    flex-shrink: 0;
}

.widget-post-item:nth-child(1) .widget-post-rank {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.widget-post-item:nth-child(2) .widget-post-rank {
    background: linear-gradient(135deg, #64748b, #475569);
}

.widget-post-item:nth-child(3) .widget-post-rank {
    background: linear-gradient(135deg, #cd7f32, #8b4513);
}

/* Widget Rated */
.widget-rated .widget-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Widget Newsletter */
.widget-newsletter {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
}

.widget-newsletter .widget-title {
    color: white;
    border-color: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.widget-newsletter-text {
    font-size: 0.875rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

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

.widget-newsletter-form input {
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.875rem;
    background: rgba(255,255,255,0.1);
    color: white;
}

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

.widget-newsletter-form input:focus {
    outline: none;
    background: rgba(255,255,255,0.15);
}

.widget-newsletter-form button {
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    background: var(--primary);
    color: white;
    cursor: pointer;
    transition: var(--transition);
}

.widget-newsletter-form button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* Widget title with icon */
.widget-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.widget-title svg {
    flex-shrink: 0;
}

/* Static Page Styles */
.page-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 2rem;
}

.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.page-meta {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.page-body {
    color: var(--gray-700);
    line-height: 1.8;
}

.page-body h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary);
}

.page-body h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-800);
    margin: 1.5rem 0 0.75rem;
}

.page-body p {
    margin-bottom: 1rem;
}

.page-body ul, .page-body ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.page-body li {
    margin-bottom: 0.5rem;
}

.page-body a {
    color: var(--primary);
    text-decoration: underline;
}

.page-body a:hover {
    color: var(--primary-dark);
}

.page-body details {
    margin-bottom: 1rem;
}

.page-body details summary {
    cursor: pointer;
    font-weight: 600;
    padding: 0.75rem;
    background: var(--gray-100);
    border-radius: var(--radius);
}

.page-body details[open] summary {
    border-radius: var(--radius) var(--radius) 0 0;
}

.page-body details p {
    padding: 1rem;
    background: var(--gray-50);
    border-radius: 0 0 var(--radius) var(--radius);
    margin: 0;
}

.content-full {
    max-width: 900px;
    margin: 0 auto;
}

/* Print Styles */
@media print {
    .header, .footer, .sidebar, .ad-banner, .download-box { display: none; }
    .main { padding: 0; }
    .post-detail { box-shadow: none; }
}
