/* Main CSS - Mobil Optimize (Dark Mode destekli) */

/* CSS Variables */
:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --text-muted: #9ca3af;            /* + eklendi */
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;              /* + eklendi */
    --gradient-main: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Mobile-first approach */
.back-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    border: 2px solid var(--primary-color);
}

.back-link:hover,
.back-link:focus {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    outline: none; /* + erişilebilirlik dokunuşu */
}

/* Main Content */
.main-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem; /* Mobile-first padding */
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-title {
    font-size: 2rem; /* Mobile-first size */
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.page-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
}

.content-card {
    background: var(--white);
    border-radius: 20px;
    padding: 2rem; /* Mobile-first padding */
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-100);
}

.section {
    margin-bottom: 2.5rem;
}

.section:last-child {
    margin-bottom: 0;
}

.section h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.section p {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 1rem;
    max-width: 65ch;          /* + tipografi iyileştirme */
    hyphens: auto;            /* + */
    word-break: break-word;   /* + */
    text-align: justify;      /* + uzun metinler için */
}

.section ul {
    color: var(--text-light);
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.section li {
    margin-bottom: 0.5rem;
}

.games-showcase {
    display: grid;
    grid-template-columns: 1fr; /* Mobile-first: single column */
    gap: 1.5rem;
    margin: 2rem 0;
}

.game-showcase-item {
    background: var(--gray-50);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
}

.game-showcase-item h4 {
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Mobile: 2 columns */
    gap: 1.5rem;
    margin: 2rem 0;
    text-align: center;
}

.stat-item {
    background: var(--primary-color);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    display: block;
    margin-bottom: 0.5rem;
}

/* Footer */
footer {
    background: #0f0f0f;
    color: white;
    text-align: center;
    padding: 3rem 2rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover,
.footer-links a:focus {
    color: white;
}

/* Desktop optimizations */
@media (min-width: 768px) {
    .main-content {
        padding: 4rem 2rem;
    }

    .content-card {
        padding: 3rem;
    }

    .page-title {
        font-size: 2.5rem;
    }

    .games-showcase {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

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

    /* + küçük bir hover iyileştirmesi */
    .section p {
        transition: color 0.2s ease;
    }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.3);
        --text-light: #374151; /* + okunabilirlik için */
    }
}

/* ====================== */
/*      DARK MODE         */
/* ====================== */
@media (prefers-color-scheme: dark) {
    :root {
        --text-dark: #f9fafb;     /* açık metin */
        --text-light: #d1d5db;    /* ikincil metin */
        --text-muted: #9ca3af;
        --white: #1f2937;         /* kart zeminleri */
        --gray-50: #111827;       /* sayfa zemini */
        --gray-100: #1f2937;      /* kenarlıklar */
        --gray-200: #374151;      /* yoğun kenarlıklar */
        --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
        --gradient-main: linear-gradient(135deg, #4f46e5 0%, #6d28d9 100%); /* hafif koyulaştırılmış */
    }

    html, body {
        background: var(--gray-50);
        color: var(--text-dark);
    }

    .page-title {
        color: var(--text-dark);
    }

    .page-subtitle,
    .section p,
    .section ul,
    .section li {
        color: var(--text-light);
    }

    .content-card {
        background: var(--white);
        border-color: var(--gray-200);
        box-shadow: var(--shadow-lg);
    }

    .game-showcase-item {
        background: var(--gray-100);
        border-left-color: var(--primary-color);
    }

    .game-showcase-item h4 {
        color: var(--text-dark);
    }

    .back-link {
        border-color: var(--primary-color);
        color: var(--primary-color);
        background: transparent;
    }

    .back-link:hover,
    .back-link:focus {
        background: var(--primary-color);
        color: #ffffff;
        transform: translateY(-2px);
    }

    .footer-links a {
        color: var(--text-muted);
    }

    .footer-links a:hover,
    .footer-links a:focus {
        color: #ffffff;
    }
}

/* Erişilebilir odak görünürlüğü */
:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 8px;
}

/* Akıcı iç bağlantı kaydırma */
html {
    scroll-behavior: smooth;
}

/* Seçim (selection) stili */
::selection {
    background: rgba(99, 102, 241, 0.2);
    color: var(--text-dark);
}
