:root {
    --bg-color: #020617;
    --text-color: #f1f5f9;
    --accent: #38bdf8; /* Cyan */
    --accent-glow: rgba(56, 189, 248, 0.5);
    --card-bg: rgba(30, 41, 59, 0.7); /* Glass effect base */
    --nav-bg: rgba(2, 6, 23, 0.9);
}

body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#pixi-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* Header & Nav */
header {
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #334155;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.logo { 
    font-size: 1.5rem; 
    font-weight: 800; 
    color: var(--text-color); 
    letter-spacing: -1px;
    text-shadow: 0 0 10px var(--accent-glow);
}
.logo span { font-size: 0.8rem; color: var(--accent); margin-left: 10px; font-weight: normal; letter-spacing: normal; }
.logo a { text-decoration: none; color: inherit; }

nav a {
    color: #cbd5e1;
    text-decoration: none;
    margin-left: 20px;
    font-size: 0.95rem;
    transition: 0.3s;
    position: relative;
}
nav a:hover { color: var(--accent); text-shadow: 0 0 8px var(--accent-glow); }

/* Layout */
.container {
    max-width: 1240px;
    margin: 20px auto;
    padding: 0 20px;
    flex: 1; /* Footer'ı aşağı itmek için */
    width: 100%;
    box-sizing: border-box;
}

.main-layout { display: flex; gap: 25px; }
main { flex: 3; }
aside { flex: 1; min-width: 300px; }

/* Search Bar */
.search-container {
    margin-bottom: 25px;
    position: relative;
}
#search-input {
    width: 100%;
    padding: 15px 20px;
    border-radius: 12px;
    border: 2px solid #334155;
    background: rgba(15, 23, 42, 0.8);
    color: white;
    font-size: 1.1rem;
    outline: none;
    transition: 0.3s;
    backdrop-filter: blur(5px);
    box-sizing: border-box;
}
#search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
}

/* Intro Text */
.intro-text {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.9));
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    border-left: 4px solid var(--accent);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* Game Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
}

.game-card {
    background: rgba(30, 41, 59, 0.8);  
    border: 1px solid rgba(56, 189, 248, 0.2);  
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: white;
    display: block;
    backdrop-filter: blur(5px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    z-index: 10;  
}

.game-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 10px 25px -5px var(--accent-glow);
    border-color: var(--accent);
    z-index: 20;
}

.game-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    transition: 0.5s;
    background-color: #0f172a;  
    min-height: 150px;
}

.game-card:hover img { transform: scale(1.1); }

.game-card .info {
    padding: 12px;
    font-size: 0.9rem;
    text-align: center;
    background: rgba(0,0,0,0.6);
    position: absolute;
    bottom: 0;
    width: 100%;
    backdrop-filter: blur(2px);
}
.game-card .cat { font-size: 0.7rem; color: #94a3b8; display: block; margin-top: 3px; }

/* Game Page Specifics */
.game-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 0 40px rgba(56, 189, 248, 0.15);
    border: 1px solid #334155;
}

#game-frame { width: 100%; height: 100%; border: none; }

 
#game-curtain {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at center, #1e293b 0%, #000000 100%);
    z-index: 50;
    display: flex;
    justify-content: center;
    align-items: center;
}

.curtain-content {
    display: flex;
    flex-direction: column;  
    align-items: center;     
    justify-content: center; 
    width: 100%;
    max-width: 600px;
    padding: 20px;
    box-sizing: border-box;
    text-align: center;
}

.curtain-content h2 {
    color: #fff; 
    margin-bottom: 25px;
    font-size: 1.5rem;
    text-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

 
.curtain-content .ad-container {
    margin: 0 0 25px 0;
    background: #000;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
}

 
#start-btn {
    padding: 15px 60px;
    background: var(--accent);
    color: #000;
    border: none;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.4);
    position: relative;
    overflow: hidden;
}

#start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(56, 189, 248, 0.6);
    background: #fff;
}

.home-btn {
    display: inline-block;
    padding: 8px 16px;
    background: #334155;
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 15px;
    transition: 0.2s;
}
.home-btn:hover { background: var(--accent); color: #000; }


.ad-container {
    background: #020617;
    margin: 20px auto;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px dashed #334155;
    border-radius: 8px;
    overflow: hidden;
}


#loading-sentinel {
    height: 50px;
    margin: 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}
.loader {
    width: 30px; height: 30px;
    border: 3px solid #fff;
    border-bottom-color: transparent;
    border-radius: 50%;
    animation: rotation 1s linear infinite;
    display: none; /* JS ile görünür yapılacak */
}
@keyframes rotation { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

footer {
    background: #0f172a;
    text-align: center;
    padding: 20px;
    border-top: 1px solid #334155;
    margin-top: auto;
    font-size: 0.8rem;
    color: #64748b;
}



@media (max-width: 768px) {
  
    .main-layout { 
        flex-direction: column; 
    }

   
    aside { 
        display: none !important; 
    }

    
    .curtain-content .ad-container {
        display: none !important;
    }

   
    .ad-970 {
        width: 100% !important;
        overflow: hidden; 
    }
}

 
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

 
.ad-970 {
    width: 970px !important;  
    height: 250px !important;  
    max-width: 100%;  
    margin: 20px auto;
    background: #020617;  
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px dashed #334155;
    border-radius: 8px;
    overflow: hidden;
}

 
.control-bar {
    display: flex;
    justify-content: space-between;  
    align-items: center;
    margin-top: 10px;
    margin-bottom: 20px;
    padding: 10px;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

 
.fs-btn {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;  
    transition: all 0.3s ease;
}

.fs-btn:hover {
    background: var(--accent);
    color: #000;
    box-shadow: 0 0 15px var(--accent-glow);
}

 
.fs-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
}