/* src/css/oyunlar.css */

.games-page {
    padding-top: var(--header-height);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Hero Section */
.games-hero {
    position: relative;
    padding: 3rem 0 1rem;
    text-align: center;
    overflow: hidden;
}

.games-hero-bg {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(var(--primary-color-rgb), 0.15) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
}

.hero-container {
    position: relative;
    z-index: 1;
}

.games-hero .page-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.games-hero .page-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Games Controls (Arama ve Filtre) */
.games-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

/* Arama Çubuğu */
.games-search {
    position: relative;
    width: 100%;
    max-width: 450px;
    transition: max-width 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.games-search:focus-within {
    max-width: 500px; /* Tıklanınca Apple stili hafif genişleme */
}

.games-search i {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 1rem;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 2;
}

.games-search input {
    width: 100%;
    background: rgba(118, 118, 128, 0.24); /* Apple iOS karanlık mod arama arka planı */
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: #fff;
    padding: 0.8rem 1.5rem 0.8rem 2.8rem;
    border-radius: 30px; /* Tam yuvarlak Apple stili */
    font-size: 1rem;
    font-weight: 400;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    outline: none;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    z-index: 1;
}

.games-search input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.games-search input:focus {
    background: rgba(118, 118, 128, 0.35);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.games-search input:focus + i,
.games-search input:not(:placeholder-shown) + i {
    color: #fff;
}

/* Kategori Filtresi Kutusu */
.games-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    max-width: 650px;
    padding: 0;
    gap: 0.6rem;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    padding: 0.5rem 1.2rem;
    border-radius: 30px; /* Minimal pill shape */
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-color);
}

.filter-btn.active {
    background: #fff;
    color: #000;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.15);
    border: 1px solid #fff;
    font-weight: 600;
}

/* Games Grid */
.games-grid-section {
    padding: 1rem 0 6rem;
    flex: 1;
    min-height: 80vh; /* Sayfanın aşağı kaymasını engeller */
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* Game Card */
.game-card {
    position: relative;
    border-radius: 20px;
    background: #1a1a1c;
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), border-color 0.4s ease, box-shadow 0.4s ease;
    transform: translateY(0) translateZ(0);
    will-change: transform;
}

.game-card:hover {
    transform: translateY(-10px);
    border-color: rgba(var(--primary-color-rgb), 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(var(--primary-color-rgb), 0.2);
}

.game-image {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.game-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.game-image::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 20px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    mask-image: linear-gradient(to top, black 20%, transparent 100%);
    -webkit-mask-image: linear-gradient(to top, black 20%, transparent 100%);
    pointer-events: none;
    z-index: 1;
    transform: translateZ(0);
}

.game-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #1a1a1c 0%, rgba(26, 26, 28, 0.7) 15%, transparent 40%);
    opacity: 1;
    pointer-events: none;
    z-index: 2;
}

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

/* Game Content */
.game-content {
    padding: calc(1.5rem + 2px) 1.5rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    position: relative;
    z-index: 3;
    background: #1a1a1c;
    margin-top: -2px; /* Overlap the edge to prevent 1px gap artifact */
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.game-name {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.game-badge {
    background: rgba(var(--primary-color-rgb), 0.2);
    color: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    border: 1px solid rgba(var(--primary-color-rgb), 0.3);
    backdrop-filter: blur(4px);
}

.game-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0 0 1.5rem 0;
    flex: 1;
}

.game-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.95rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.game-action i {
    transform: translateX(0);
    transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.game-card:hover .game-action {
    color: #fff;
    border-top-color: rgba(var(--primary-color-rgb), 0.3);
}

.game-card:hover .game-action i {
    transform: translateX(5px);
}

/* Empty State */
.games-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 5rem 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    margin-top: 2rem;
}

.games-empty-state i {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.games-empty-state h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.games-empty-state p {
    color: var(--text-muted);
    max-width: 400px;
}

/* Responsive */
@media (max-width: 1024px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
}

@media (max-width: 768px) {
    .games-hero {
        padding: 1.5rem 1rem 0;
    }
    
    .games-hero .page-description {
        max-width: 100%;
        padding: 0 0.5rem;
        font-size: 1.05rem;
    }
    
    .games-grid-section {
        padding: 1rem 1rem 6rem;
    }

    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .games-search {
        max-width: 100%;
    }
}

@media (max-width: 600px) {
    .games-grid {
        grid-template-columns: repeat(1, 1fr);
        max-width: 380px; /* Make the game cards slightly thinner */
        margin: 0 auto; /* Center them */
    }
    
    .game-image {
        height: 200px; /* Adjust height slightly for thinner cards */
    }
}
