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

:root {
    --primary-color: #2d5016;
    --secondary-color: #4a7c2c;
    --accent-color: #7cb342;
    --light-bg: #f5f5f5;
    --dark-text: #333;
    --border-color: #ddd;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
    color: var(--dark-text);
    line-height: 1.6;
}

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

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 40px 20px;
    text-align: center;
    margin-bottom: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.9;
}

.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
    margin-top: 15px;
}

.admin-badge {
    background-color: rgba(255, 255, 255, 0.3);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
}

.btn-logout {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
    padding: 8px 16px;
    margin-top: 0;
}

.btn-logout:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Navigation */
.nav {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-btn {
    padding: 12px 24px;
    border: 2px solid var(--primary-color);
    background-color: white;
    color: var(--primary-color);
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background-color: var(--light-bg);
}

.nav-btn.active {
    background-color: var(--primary-color);
    color: white;
}

/* Main Content */
.main-content {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    min-height: 500px;
}

.section {
    display: none;
}

.section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.section h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.8em;
}

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.game-card {
    background-color: #f9f9f9;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
}

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

.game-card h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.game-card p {
    color: #666;
    margin-bottom: 10px;
    font-size: 0.95em;
}

.game-version {
    display: inline-block;
    background-color: var(--accent-color);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    margin-bottom: 15px;
}

.game-link {
    display: inline-block;
    background-color: var(--secondary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s ease;
    margin-right: 10px;
}

.game-link:hover {
    background-color: var(--primary-color);
}

.delete-btn {
    background-color: #e74c3c;
    color: white;
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.3s ease;
}

.delete-btn:hover {
    background-color: #c0392b;
}

/* Maps Grid */
.maps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.map-card {
    background-color: #f9f9f9;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

.map-card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

.map-card h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.map-card p {
    color: #666;
    margin-bottom: 10px;
    font-size: 0.95em;
}

.map-size {
    display: inline-block;
    background-color: var(--accent-color);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    margin-bottom: 15px;
}

.map-link {
    display: inline-block;
    background-color: var(--secondary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s ease;
    margin-right: 10px;
}

.map-link:hover {
    background-color: var(--primary-color);
}

/* Updates List */
.updates-list {
    margin-bottom: 20px;
}

.update-item {
    background-color: #f9f9f9;
    border-left: 4px solid var(--accent-color);
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.update-item:hover {
    box-shadow: var(--shadow);
    transform: translateX(5px);
}

.update-item h3 {
    color: var(--primary-color);
    margin-bottom: 8px;
}

.update-date {
    color: #999;
    font-size: 0.9em;
    margin-bottom: 10px;
}

.update-content {
    color: #666;
    line-height: 1.6;
}

.update-actions {
    margin-top: 10px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    margin-top: 20px;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: var(--primary-color);
}

.modal-content h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

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

.modal-content input,
.modal-content textarea {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: inherit;
    font-size: 1em;
}

.modal-content input:focus,
.modal-content textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 5px rgba(124, 179, 66, 0.3);
}

.modal-content textarea {
    resize: vertical;
    min-height: 100px;
}

/* Admin Panel */
.admin-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.admin-section {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid var(--border-color);
}

.admin-section h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.2em;
}

.admin-list {
    margin-top: 15px;
}

.admin-item {
    background-color: white;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 6px;
    border-left: 4px solid var(--accent-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.admin-item:hover {
    box-shadow: var(--shadow);
}

.admin-item-info h4 {
    color: var(--primary-color);
    margin-bottom: 5px;
    font-size: 0.95em;
}

.admin-item-info p {
    color: #666;
    font-size: 0.85em;
    margin: 3px 0;
}

.admin-item-actions {
    display: flex;
    gap: 8px;
}

.edit-btn {
    background-color: #3498db;
    color: white;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
    transition: background-color 0.3s ease;
}

.edit-btn:hover {
    background-color: #2980b9;
}

/* Login Hint */
.login-hint {
    margin-top: 15px;
    color: #999;
    font-size: 0.9em;
    text-align: center;
}

.login-hint code {
    background-color: var(--light-bg);
    padding: 4px 8px;
    border-radius: 4px;
    font-family: monospace;
    color: var(--primary-color);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.empty-state p {
    font-size: 1.1em;
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2em;
    }

    .games-grid,
    .maps-grid {
        grid-template-columns: 1fr;
    }

    .nav {
        flex-direction: column;
    }

    .nav-btn {
        width: 100%;
    }

    .main-content {
        padding: 20px;
    }
}
