/* assets/css/style.css */

/* GENEL STİLLER */
* {
    margin: 0; 
    padding: 0; 
    box-sizing: border-box;
}

body {
    font-family: "Comic Sans MS", cursive, sans-serif; /* Çocuklara hitap eden bir font */
    background: linear-gradient(135deg, #f9f9f9 0%, #e3ffe7 100%);
    color: #333;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 0;
}

h1, h2, h3 {
    margin-bottom: 10px;
}

a {
    text-decoration: none;
    color: #333;
}

/* HEADER */
header {
    background: #ff9800;
    color: #fff;
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

header .container {
    display: flex;
    flex-direction: column;
}

.header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo h1 {
    font-size: 28px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 15px;
}

nav ul li a {
    color: #fff;
    font-weight: bold;
    padding: 5px 10px;
    transition: background 0.3s;
}

nav ul li a:hover {
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
}

/* SEARCH BAR */
.search-bar {
    flex: 1;
    text-align: right;
    margin-right: 20px;
}

.search-bar form {
    display: inline-flex;
}

.search-bar input[type="text"] {
    padding: 5px 10px;
    border: 1px solid #ccc;
    border-radius: 4px 0 0 4px;
    outline: none;
}

.search-bar button {
    padding: 6px 12px;
    border: none;
    background: #fff;
    color: #ff9800;
    font-weight: bold;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background 0.3s;
}

.search-bar button:hover {
    background: #f5f5f5;
}

/* KATEGORİ MENÜSÜ - EMOJİLİ, YATAY KAYDIRMALI */
.category-menu {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;        /* Tek satırda tutar */
    gap: 10px;
    background: #ffd54f;
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
    overflow-x: auto !important;         /* Taşma olursa yatay kaydırma çubuğu */
    white-space: nowrap !important;      /* Metin alt satıra geçmesin */
}

.category-menu::-webkit-scrollbar {
    height: 8px;
}

.category-menu::-webkit-scrollbar-track {
    background: #ffe082;
}

.category-menu::-webkit-scrollbar-thumb {
    background: #ffcc80;
    border-radius: 4px;
}

.category-menu a {
    display: inline-flex !important;    /* Her linkin kendi içeriği kadar yer kaplaması */
    align-items: center;
    flex-shrink: 0;
    white-space: nowrap !important;
    color: #333;
    padding: 5px 10px;
    background: #fff;
    border-radius: 4px;
    transition: 0.3s;
}

.category-menu a:hover {
    background: #ffe082;
}

.active-cat {
    background: #ffcc80 !important;
    font-weight: bold;
}


/* ANA SAYFA OYUN LİSTESİ */
.game-list {
    margin-top: 20px;
}

.game-list h2 {
    margin-bottom: 15px;
    font-size: 24px;
    color: #e65100;
}

.games {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.game-item {
    background: #fff;
    padding: 10px;
    width: 220px;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
    text-align: center;
    border-radius: 4px;
    transition: transform 0.3s;
    position: relative;
}

.game-item:hover {
    transform: translateY(-5px);
}

.game-item img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.game-item h3 {
    margin: 10px 0 5px 0;
    font-size: 18px;
    color: #333;
}

.category-label {
    font-size: 14px;
    color: #666;
}

.no-game {
    text-align: center;
    font-size: 18px;
    color: #b71c1c;
    margin-top: 30px;
}

/* OYUN SAYFASI */
.game-play .container {
    margin-top: 20px;
}

.game-play h2 {
    margin-bottom: 10px;
    color: #e65100;
}

.banner-top {
    width: 970px;
    height: 250px;
    margin: 0 auto 20px auto;
    background-color: #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #333;
    border-radius: 4px;
}

.content-row {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.ad-left,
.ad-right {
    width: 160px;
    height: 600px;
    background-color: #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #333;
    border-radius: 4px;
}

.iframe-container {
    width: 800px;
    height: 600px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Fullscreen butonu */
.fullscreen-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: #ff9800;
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    opacity: 0.8;
    transition: 0.3s;
}

.fullscreen-btn:hover {
    opacity: 1;
}

.game-description {
    margin-top: 20px;
    background: #fff;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
}

/* ADMIN PANEL */
.admin-header {
    background: #d32f2f;
    color: #fff;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-header h1 {
    margin: 0;
    font-size: 24px;
}

.admin-header nav ul {
    list-style: none;
    display: flex;
    gap: 10px;
}

.admin-header nav ul li a {
    color: #fff;
    font-weight: bold;
    padding: 5px 10px;
    transition: background 0.3s;
    border-radius: 4px;
}

.admin-header nav ul li a:hover {
    background: rgba(255,255,255,0.2);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
}

table th, table td {
    padding: 10px;
    border: 1px solid #eee;
    text-align: left;
}

.error {
    color: red;
    font-weight: bold;
}

/* FORM STİLLERİ */
form input[type="text"],
form input[type="password"],
form select,
form textarea {
    width: 100%;
    max-width: 400px;
    padding: 8px;
    box-sizing: border-box;
    margin-top: 5px;
    border-radius: 4px;
    border: 1px solid #ccc;
    outline: none;
}

form input[type="submit"],
form button {
    padding: 10px 20px;
    cursor: pointer;
    background: #ff9800;
    color: #fff;
    border: none;
    border-radius: 4px;
    margin-top: 10px;
    font-weight: bold;
    transition: 0.3s;
}

form input[type="submit"]:hover,
form button:hover {
    background: #fb8c00;
}

label {
    font-weight: bold;
}

/* FOOTER */
footer {
    background: #ff9800;
    color: #fff;
    text-align: center;
    padding: 10px 0;
    margin-top: 20px;
    position: relative;
}

/* RESPONSIVE AYARLAMALAR */
@media (max-width: 1200px) {
    .banner-top {
        width: 100%;
        max-width: 970px;
    }
}

@media (max-width: 992px) {
    .header-flex, .admin-header {
        flex-direction: column;
        gap: 10px;
    }
    .search-bar {
        margin-right: 0;
        text-align: center;
    }
    .content-row {
        flex-direction: column;
        align-items: center;
    }
    .ad-left, .ad-right {
        margin-bottom: 20px;
    }
    .iframe-container {
        width: 100%;
        max-width: 800px;
    }
}

@media (max-width: 768px) {
    .game-item {
        width: calc(50% - 20px);
    }
}

@media (max-width: 480px) {
    .game-item {
        width: 100%;
    }
    nav ul li {
        display: block;
        margin-bottom: 10px;
    }
}
