/* =================== Global =================== */
body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    background-color: #0f172a;
    color: #e2e8f0;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* =================== Header =================== */
header {
    background: #1e293b;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

header .nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
}

header .logo {
    font-size: 24px;
    font-weight: bold;
    color: #58a6ff;
}

header nav a {
    margin-left: 20px;
    color: #e2e8f0;
    font-weight: 500;
    transition: 0.3s;
}

header nav a:hover {
    color: #58a6ff;
}

/* =================== Footer =================== */
footer {
    background: #1e293b;
    padding: 30px 15px;
    color: #cbd5e1;
    margin-top: 50px;
}

footer .footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

footer .footer-left,
footer .footer-right {
    flex: 1 1 300px;
    margin: 10px;
}

footer h4 {
    color: #58a6ff;
    margin-bottom: 15px;
}

footer a {
    color: #cbd5e1;
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    transition: 0.3s;
}

footer a:hover {
    color: #58a6ff;
}

/* =================== Game Cards =================== */
.games-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.game-card {
    background: #1e293b;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(88, 166, 255, 0.3);
}

.game-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.game-card:hover img {
    transform: scale(1.05);
}

.game-card-content {
    padding: 15px;
}

.game-card-content h3 {
    color: #58a6ff;
    font-size: 18px;
    margin-bottom: 8px;
}

.game-card-content p {
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.6;
    height: 45px;
    overflow: hidden;
}

/* =================== Game Page =================== */
.game-wrapper {
    max-width: 900px;
    margin: 40px auto;
    background: #1e293b;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.game-wrapper iframe {
    width: 100%;
    height: 600px;
    border: none;
    border-radius: 8px;
    margin-bottom: 20px;
}

.game-description h2 {
    color: #58a6ff;
    margin-bottom: 10px;
}

.game-description p {
    color: #cbd5e1;
    line-height: 1.8;
    font-size: 15px;
}

/* =================== Admin Panel =================== */
.admin-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 20px;
    background: #1e293b;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.admin-container h1, .admin-container h2 {
    color: #58a6ff;
}

form input, form textarea {
    width: 100%;
    padding: 10px;
    background: #334155;
    border: none;
    border-radius: 6px;
    color: #f1f5f9;
    margin-bottom: 10px;
}

form button {
    background: #58a6ff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    color: #fff;
    transition: 0.3s;
}

form button:hover {
    background: #2563eb;
}

table {
    width: 100%;
    border-collapse: collapse;
    color: #e2e8f0;
    margin-top: 20px;
}

th, td {
    padding: 10px;
    border-bottom: 1px solid #334155;
    text-align: left;
}

th {
    background: #111827;
    color: #58a6ff;
}

td a {
    color: #58a6ff;
    text-decoration: none;
    margin-right: 10px;
    font-weight: 500;
}

td a:hover {
    color: #7dd3fc;
}

.edit-form {
    background: #0f172a;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

/* =================== Responsive =================== */
@media (max-width: 1024px) {
    .game-card img {
        height: 180px;
    }
}

@media (max-width: 768px) {
    .games-container {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }
    .game-card img {
        height: 150px;
    }
    .game-card-content h3 {
        font-size: 16px;
    }
    .game-card-content p {
        font-size: 13px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .game-card img {
        height: 130px;
    }
    .game-card-content p {
        height: 35px;
    }
    header .nav-container {
        flex-direction: column;
        align-items: flex-start;
    }
    header nav a {
        margin: 10px 0 0 0;
    }
}
