/* --- RESET & VARIABEL GLOBAL --- */
:root {
    --primary-color: #4CAF50;
    --primary-hover: #45a049;
    --bg-color: #f4f7f6;
    --text-color: #333;
    --card-bg: #ffffff;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}

/* --- TIPOGRAFI --- */
h1 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 30px;
}

h2 {
    color: #444;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    display: inline-block;
}

/* --- FORM & INPUT (Admin & Play) --- */
form {
    background-color: var(--card-bg);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
}

label {
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

input[type="text"], 
textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: monospace; /* Bagus untuk area script */
    font-size: 14px;
}

input[type="text"]:focus, 
textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.3);
}

button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: var(--primary-hover);
}

/* --- DAFTAR GAME (Katalog index.html) --- */
#game-list {
    list-style-type: none;
    padding: 0;
}

#game-list li {
    background-color: var(--card-bg);
    margin-bottom: 15px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: transform 0.2s ease;
}

#game-list li:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

#game-list a {
    display: block;
    padding: 20px;
    text-decoration: none;
    color: var(--text-color);
    font-size: 18px;
    font-weight: bold;
}

#game-list a::after {
    content: "▶ Mainkan";
    float: right;
    color: var(--primary-color);
    font-size: 14px;
    margin-top: 2px;
}

/* --- AREA BERMAIN (play.html) --- */
#game-container {
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-top: 20px;
}

#game-title-display {
    text-align: center;
    margin-bottom: 25px;
    display: block;
}

#game-canvas {
    width: 100%;
    min-height: 400px;
    border: 2px dashed #ddd;
    border-radius: var(--border-radius);
    padding: 20px;
    background-color: #fafafa;
    /* Membuat wadah game lebih terkontrol */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#status-message {
    text-align: center;
    font-weight: bold;
    color: var(--primary-color);
    margin-top: 15px;
}
