@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;600&display=swap');

:root {
    --bg-color: #f0f8ff; /* AliceBlue */
    --primary-color: #ffc107; /* Yellow */
    --secondary-color: #00bcd4; /* Cyan */
    --text-color: #333;
    --card-bg: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Fredoka', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
}

header {
    background-color: var(--secondary-color);
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

header img {
    height: 60px;
    border-radius: 50%;
    border: 3px solid white;
}

header h1 {
    color: white;
    font-size: 2.5rem;
    text-shadow: 2px 2px 0px rgba(0,0,0,0.2);
}

header h1 a {
    color: white;
    text-decoration: none;
}

.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.game-card {
    background-color: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    display: block;
    border: 4px solid transparent;
}

.game-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 20px rgba(0,0,0,0.15);
    border-color: var(--primary-color);
}

.game-thumb {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.game-title {
    padding: 15px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--secondary-color);
}

/* Play Page */
.play-container {
    max-width: 1000px;
    margin: 20px auto;
    background: var(--card-bg);
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.back-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    font-size: 1.2rem;
}

.back-btn:hover {
    background-color: #ffb300;
}

.game-frame-container {
    width: 100%;
    height: 600px;
    border-radius: 10px;
    overflow: hidden;
    border: 4px solid var(--primary-color);
}

.game-frame {
    width: 100%;
    height: 100%;
    border: none;
}

/* Admin Styles */
.admin-container {
    max-width: 600px;
    margin: 50px auto;
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.admin-form input, .admin-form button, .admin-form label {
    font-size: 1.1rem;
    font-family: inherit;
}
.admin-form input {
    padding: 10px;
    border-radius: 10px;
    border: 2px solid #eee;
}

.admin-form button {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    cursor: pointer;
    font-weight: bold;
    padding: 15px;
    border-radius: 10px;
}

.admin-form button:hover {
    background-color: #0097a7;
}

.alert {
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}
.alert-success { background: #d4edda; color: #155724; }
.alert-danger { background: #f8d7da; color: #721c24; }
