* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Navigation */
.top-nav {
    background: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

    .top-nav a {
        padding: 10px 20px;
        text-decoration: none;
        color: #555;
        border-radius: 5px;
        transition: all 0.3s;
        font-weight: 600;
    }

        .top-nav a:hover {
            background: #f0f0f0;
        }

        .top-nav a.active {
            background: #667eea;
            color: white;
        }

/* Header */
header {
    background: white;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    header h1 {
        color: #667eea;
        font-size: 2.5em;
    }

/* Authentication Screen */
.auth-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.auth-box {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    text-align: center;
    min-width: 350px;
}

    .auth-box h2 {
        margin-bottom: 30px;
        color: #667eea;
    }

    .auth-box input {
        width: 100%;
        padding: 15px;
        border: 2px solid #e0e0e0;
        border-radius: 8px;
        font-size: 16px;
        margin-bottom: 20px;
    }

    .auth-box button {
        width: 100%;
        padding: 15px;
        background: #667eea;
        color: white;
        border: none;
        border-radius: 8px;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s;
    }

        .auth-box button:hover {
            background: #5568d3;
            transform: translateY(-2px);
        }

/* Sections */
section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

    section h2 {
        color: #667eea;
        margin-bottom: 20px;
        font-size: 1.8em;
    }

/* Forms */
.form-group {
    margin-bottom: 20px;
}

    .form-group label {
        display: block;
        margin-bottom: 8px;
        font-weight: 600;
        color: #555;
    }

    .form-group input,
    .form-group select {
        width: 100%;
        padding: 12px;
        border: 2px solid #e0e0e0;
        border-radius: 8px;
        font-size: 16px;
    }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

button {
    padding: 12px 24px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

    button:hover {
        background: #5568d3;
        transform: translateY(-2px);
    }

.submit-btn {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    margin-top: 20px;
}

.logout-btn {
    background: #e74c3c;
}

    .logout-btn:hover {
        background: #c0392b;
    }

/* Tables */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

    table th {
        background: #667eea;
        color: white;
        padding: 15px;
        text-align: left;
        font-weight: 600;
    }

    table td {
        padding: 15px;
        border-bottom: 1px solid #e0e0e0;
    }

    table tr:hover {
        background: #f8f9fa;
    }

.delete-btn {
    background: #e74c3c;
    padding: 8px 16px;
    font-size: 14px;
}

    .delete-btn:hover {
        background: #c0392b;
    }

/* Messages */
.error-message {
    color: #e74c3c;
    margin-top: 10px;
    font-weight: 600;
}

.success-message {
    color: #27ae60;
    margin-top: 10px;
    font-weight: 600;
}

#game-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
}

    #game-message.success {
        background: #d4edda;
        color: #155724;
        border: 1px solid #c3e6cb;
    }

    #game-message.error {
        background: #f8d7da;
        color: #721c24;
        border: 1px solid #f5c6cb;
    }

/* Responsive */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    header h1 {
        font-size: 1.8em;
    }
}
